This library allows the redefinition of the files to which the special streams user_input, user_output, and user_error point to. On startup they point to the standard input, standard output, and standard error, in Unix style (Windows users may find that standard error stream does not work properly). Changing the file pointed to is useful for, e.g., redirecting the place to which the Prolog's standard error stream goes from within Prolog (e.g., to start a log file).
Usage:set_stream(StreamAlias,NewStream,OldStream)
Associate StreamAlias with an open stream newStream. Returns in OldStream the stream previously associated with the alias. The mode of NewStream must match the intended use of StreamAlias.
Usage:get_stream(StreamAlias,Stream)
Return in Stream the stream associated with StreamAlias.