Open4
Implements ISO's open/4: like Open3, but with an explicit fourth argument listing stream_property/2 options (currently only alias(Name) has any effect, registering the new channel under Name in addition to an auto-generated alias; other recognized-but-fixed properties, e.g. type(text), must match this implementation's only supported value).
?- open('out.txt', write, Stream, [alias(myout)]), write(myout, hello), close(myout).Content copied to clipboard
Throws
if the first, second or fourth argument is unbound.
(stream_property) if an element of the options list is not a stream_property/2 shape.
if an element of the options list is a stream_property/2 shape this implementation does not actually support (e.g. type(binary)), or if the resource cannot be opened (e.g. missing file, or writing attempted on a non-file it.unibo.tuprolog.solve.libs.io.Url).