Package-level declarations
Types
The :io-lib it.unibo.tuprolog.solve.library.Library, contributing the ISO Prolog stream/I/O predicates: stream management (open/3,4, close/1,2, current_input/1, current_output/1, set_input/1, set_output/1, stream_property/2, at_end_of_stream/0,1, flush_output/1), character/code-level reading and writing (get_char/1,2, get_code/1,2, peek_char/1,2, peek_code/1,2, put_char/1,2, put_code/1,2, nl/1), term I/O (read/1,2, read_term/2,3, write/2, writeq/1,2, write_canonical/1,2, write_term/2,3), plus the tuProlog-specific consult/1 and set_theory/1 for loading a theory from a it.unibo.tuprolog.solve.libs.io.Url.
The three modes a stream can be opened with via it.unibo.tuprolog.solve.libs.io.primitives.Open3 or it.unibo.tuprolog.solve.libs.io.primitives.Open4, mirroring the mode argument of ISO's open/3,4: READ opens an existing source for input, WRITE truncates (or creates) a sink for output, and APPEND opens (or creates) a sink for output, positioned at its end.
JS implementation of Url, hand-parsed via the WHATWG JsNativeUrl binding (there being no java.net.URL equivalent to wrap, unlike it.unibo.tuprolog.solve.libs.io.JvmUrl).
A parsed source/sink locator, as accepted by the ISO SourceSink argument of open/3,4 and consult/1 (see it.unibo.tuprolog.solve.libs.io.primitives.IOPrimitiveUtils.ensuringArgumentIsUrl), and the type this module's stream-opening functions (openInputChannel, openOutputChannel) operate on.
Functions
Platform-specific factory backing Url.Companion.file: builds a file://-scheme Url for path.
Platform-specific factory backing Url.Companion.file: builds a file://-scheme Url for path.
Opens this Url for reading, e.g. to back open(Url, read, Stream) (see it.unibo.tuprolog.solve.libs.io.primitives.Open3) or it.unibo.tuprolog.solve.libs.io.primitives.Consult.
Under Node, streams a local file lazily off disk. Everywhere else (browser-local or any remote resource), eagerly reads the whole resource via Url.readAsText into an in-memory InputChannel instead, since Okio has no synchronous file system for browsers and this module has no HTTP streaming client (see fetch).
Streams a local file lazily off disk via LocalFileSystem; for any non-Url.isFile URL (http(s), ...), lazily streams from java.net.URL.openStream, unlike the JS implementation which eagerly buffers remote resources in full.
Opens this Url for writing (or, if append, for appending), e.g. to back open(Url, write, Stream) (see it.unibo.tuprolog.solve.libs.io.primitives.Open3).
Only supported for local files under Node: browsers have no writable local file system, and this module never supports writing to remote resources (on any platform).
Only supported for Url.isFile URLs: writing to a remote resource is never supported (on any platform).
Platform-specific factory backing Url.Companion.of: parses string into a Url.
Platform-specific factory backing Url.Companion.of: parses string into a Url.
Platform-specific factory backing Url.Companion.remote.
Platform-specific factory backing Url.Companion.remote.