Noeud: Stream IO, Noeud « Next »: , Noeud « Previous »: Character Input/Output, Noeud « Up »: Input / Output



Stream IO

open(+FileName,+Mode,-Stream)
If FileName is a valid file name, the file is opened in mode Mode (invoking the UNIX function fopen) and the resulting stream is unified with Stream. Mode is one of:
read
Open the file for input.
write
Open the file for output. The file is created if it does not already exist, the file will otherwise be truncated.
append
Open the file for output. The file is created if it does not already exist, the file will otherwise be appended to.

close(+Stream)
If Stream is a stream the stream is closed.
absolute_file_name(+RelativeName,?AbsoluteName)
This predicate is used by all predicates that refer to filenames for resolving these. The argument RelativeName is interpreted as a filename according to the filename syntax rules (voir Input / Output). If the specified file is found (possibly with a .pl extension), AbsoluteName is unified with the full path name of this file.
current_input(?Stream)
Unify Stream with the current input stream. The current input stream is also accessed by the C variable SP_curin.
current_output(?Stream)
Unify Stream with the current output stream. The current output stream is also accessed by the C variable SP_curout.
set_input(+Stream)
Set the current input stream to Stream.
set_output(+Stream)
Set the current output stream to Stream.
flush_output
flush_output(+Stream)
Flush all internally buffered characters for Stream to the operating system.
from_alias_to_stream(+Alias,?Stream)
Unify Stream with the stream aliased to Alias.
add_stream_alias(+Stream_or_Alias,+Alias)
Alias the stream given by Stream_or_Alias with Alias.