current_stream(?AbsFile, ?Mode, ?Stream)
Stream is a stream, which is currently open on file AbsFile in mode Mode.
for streams opened with
open/[3,4] this is
[read, write, append].
For other streams Mode may have other values.
user_errorwill not be recognized or generated by
This is unlike
stream_property/3, which can backtrack over all
streams, including the pre-defined ones.
Can be used to backtrack through all open streams.