- If Atom is bound, test if the stream has the specified alias. Otherwise unify Atom with the first alias of the stream.bugBacktracking does not give other aliases.
- SWI-Prolog extension to query the buffering mode of this stream.
Buffering is one of
false. See also open/4.
- SWI-Prolog extension to query the size of the I/O buffer associated to a stream in bytes. Fails if the stream is not buffered.
- If present and
true, a BOM (Byte Order Mark) was detected while opening the file for reading, or a BOM was written while opening the stream. See section 22.214.171.124 for details.
- Determine whether or not abort/0 closes the stream. By default streams are closed.
- Determine whether or not the stream is closed when executing a new
process (exec() in Unix, CreateProcess() in Windows). Default is to
close streams. This maps to fcntl()
F_SETFDusing the flag
FD_CLOEXECon Unix and (negated)
- Query the encoding used for text. See section 2.19.1 for an overview of wide character and encoding issues in SWI-Prolog.
- If Stream is an input stream, unify E with one of
past. See also at_end_of_stream/[0,1].
- Unify A with one of
error. See open/4 for details.
- If Stream is associated to a file, unify Atom to the name of this file.
- If the stream is associated with a POSIX file descriptor, unify
Integer with the descriptor number. SWI-Prolog extension used
primarily for integration with foreign code. See also Sfileno() from
- True if Stream has mode
- True when Locale is the current locale associated with the stream. See section 4.23.
- Unify IOMode to the mode given to open/4
for opening the stream. Values are:
appendand the SWI-Prolog extension
- One of
dos, text streams will emit
\rfrom input streams. Default depends on the operating system.
- Number of hard links to the file. This expresses the number of `names'
the file has. Not supported on all operating systems and the value might
be bogus. See the documentation of fstat() for your OS and the value
- True if Stream has mode
- Unify Pos with the current stream position. A stream position is an opaque term whose fields can be extracted using stream_position_data/3. See also set_stream_position/2.
- Unify Bool with true if the position of the stream can be set (see seek/4). It is assumed the position can be set if the stream has a seek-function and is not based on a POSIX file descriptor that is not associated to a regular file.
- Determines behaviour of character output if the stream cannot represent
a character. For example, an ISO Latin-1 stream cannot represent
Cyrillic characters. The behaviour is one of
error(throw an I/O error exception),
\...\escape code) or
&#...;XML character entity). The initial mode is
prologfor the user streams and
errorfor all other streams. See also section 2.19.1 and set_stream/2.
- Time is the timeout currently associated with the stream. See
with the same option. If no timeout is specified,
Time is unified to the atom
- Unify Type with
- This property is reported with Bool equal to
trueif the stream is associated with a terminal. See also set_stream/2.
- Atom is one of
ignore. The latter is intended to deal with service processes for which the standard output handles are not connected to valid streams. In these cases write errors may be ignored on