current_stream(
*File,
*Mode,
*Stream)
succeeds if
Stream is a stream that is currently open on file File in mode
Mode, where Mode is either read
, write
, or
append
. None of the arguments need be initially instantiated.
This predicate is nondeterminate and can be used to backtrack through all
open streams. It fails when there are no (further) matching open streams.
current_stream/3
ignores the three special streams for the standard
input, output, and error channels.