stream_property/2
[ISO]stream_property(?Stream, ?Property))
Stream Stream has stream property Property.
A stream property, one of the following:
file_name(
F)
mode(
M)
input
input
and
output
stream properties are set for bidirectional streams.
output
input
and
output
stream properties are set for bidirectional streams.
alias(
A)
position(
P)
open/4
option reposition(true)
.
Same as stream_position(Stream, P)
except that the latter can be
called on any stream, regardless of the value of the reposition/1
open/4
option.
end_of_stream(
E)
not
; otherwise, (all
characters read) but no end of stream indicator (-1 or
end_of_file
) was reported yet, then E is unified with
at
; otherwise, E is unified with past
.
eof_action(
A)
eof_action
option of open/4
.
type(
T)
text
, binary
, cf. the
type
option of open/4
.
encoding(
CS)
encoding
option of open/4
. Note that the encoding used
may be different from the encoding
option passed to
open/4
if a byte order mark or other information was used to
determine the real encoding of the file, cf. the encoding_signature
option
of open/4
.
eol(
EOL)
eol
option of open/4
.
encoding_signature(
ES)
If the file contents was used to determine the character encoding then
ES will be true. Typically this is the result of opening, in
mode read
, a text file that contains a byte order mark or some
other information that lets open/[3,4]
determine a suitable
encoding, cf. the encoding_signature
option of open/4
.
Otherwise if the stream is open in direction output then ES
will be as specified when the file was opened.
reposition(
REPOSITION)
set_stream_position/2
, cf. the reposition
option of open/4
.
Most streams have only a subset of these properties set.
More properties may be added in the future.
Can be used to backtrack over all currently open streams, including the standard input/output/error streams, and all their properties. See ref-iou-sfh-bos.
domain_error