4.6.7.8 Finding Out About Open Streams

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. current_stream/3 ignores the three special streams for the standard input, output, and error channels.

stream_property(Stream, Property) succeeds if Stream is a currently open stream with property Property. The three standard channels are not ignored.


Send feedback on this subject.