Establish a stream from Specification that should be closed
using Close, which can either be called or passed to
- Set stream to encoding Enc.
Without loaded plugins, the open_any/5
processes the following values for Specification. If no rule
processes Specification as
- A plain stream handle. Possisible post-processing options such as
encoding are applied. Close does not close the stream,
but resets other side-effects such as the encoding.
- Same as a plain Stream.
- If Specification is of the form =file://...=, the pointed to
file is opened using open/4.
library(uri) to be installed.
- Explicitly open the file Path. Path can be an Path(File)
term as accepted by absolute_file_name/3.
- Open a Prolog string, atom, list of characters or codes as an input
The typical usage scenario is given in the code below, where
<process> processes the input.
open_any(Spec, read, In, Close, Options),
Currently, the following libraries extend this predicate:
- Adds support for URLs using the