current_stream(?Object,
?Mode, ?Stream)The predicate current_stream/3
is used to access the status of a stream as well as to generate all open
streams. Object is the name of the file opened if the stream
refers to an open file, an integer file descriptor if the stream
encapsulates an operating system stream, or the atom []
if
the stream refers to some other object.
Mode is one of read
or write
.