%% Copyright (c) 1995,1996 by the University of Pennsylvania %% %% For information about the distributaion, copying, and modification %% %% of this software, please read the file COPYING located in the root %% %% directory of this distribnutaion. If you did not receive the file %% %% COPYING write to Philip Wickline at the address below. %% %% This program is distributed in the hope that it will be useful but %% %% WITHOUT ANY WARRANTY; without even the implied warranty of %% %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file %% %% COPYING for more details. %% %% For information about the structure of the Terzo lambdaProlog %% %% implementation, see the file src/README in this distribution. Please %% %% address any questions about this code or the Terzo lambdaProlog %% %% implementation to Philip Wickline at . %% %% Authors: %% %% Philip Wickline %% module File. import Exception, StreamIo. % File exceptions type file_not_found, file_unreadable string -> exn. type open_in string -> in_stream -> o. % open_in file strm % Opens file for reading. type open_out, open_append string -> out_stream -> o. % open_out file % Opens file for writing. If the file does not exist, % then a new file with indicated name is created, if % possible. If the file already exists, then open_out % trunates the file, and begins writing at the begining, % while open_append begins writing at the end. type close_in in_stream -> o. type close_out out_stream -> o. % Closes the indicated stream.