11.2.9 File and Stream Handling

byte_count(+S,-N)
N is the number of bytes read/written on binary stream S
character_count(+S,-N)
N is the number of characters read/written on text stream S
close(+F) ISO
close(+F,+O) ISO
close file or stream F with options O
current_input(-S) ISO
S is the current input stream
current_output(-S) ISO
S is the current output stream
current_stream(?F,?M,?S)
S is a stream open on file F in mode M
line_count(+S,-N)
N is the number of lines read/written on text stream S
line_position(+S,-N)
N is the number of characters read/written on the current line of text stream S
open(+F,+M,-S) ISO
open(+F,+M,-S,+O) ISO
file F is opened in mode M, options O, returning stream S
open_null_stream(+S)
new output to text stream S goes nowhere
prompt(-O,+N)
queries or changes the prompt string of the current input stream
see(+F)
make file F the current input stream
seeing(-N)
the current input stream is named N
seek(+S,+O,+M,+N)
seek to an arbitrary byte position on the stream S
seen
close the current input stream
set_input(+S) ISO
select S as the current input stream
set_output(+S) ISO
select S as the current output stream
set_stream_position(+S,+P) ISO
P is the new position of stream S
stream_code(?S,?C)
Converts between Prolog and C representations of a stream
stream_position(+S,-P)
P is the current position of stream S
stream_position_data(?Field,?Position,?Data)
The Field field of the stream position term Position is Data.
stream_property(?Stream, ?Property)) ISO
Stream Stream has property Property.
tell(+F)
make file F the current output stream
telling(-N)
to file N
told
close the current output stream

Send feedback on this subject.