Liking cljdoc? Tell your friends :D

convex.run.stream

Handling files and STDIO streams.

A stream is an id that represents an opened file or a STDIO streams. Those ids are kept in env.

All operations, such as closing a stream or reading one, rely on operation.

Used for implementing IO requests.

Handling files and STDIO streams.

A stream is an id that represents an opened file or a STDIO streams. Those ids are kept in env.

All operations, such as closing a stream or reading one, rely on [[operation]].

Used for implementing IO requests.
raw docstring

closeclj

(close env id)

Closes the requested stream.

Closes the requested stream.
sourceraw docstring

close-allclj

(close-all {:as env :convex.run/keys [stream+]})

Closes all streams in env.

Not needed if the runner is run standalone since the OS closes them when the process terminates.

Closes all streams in env.

Not needed if the runner is run standalone since the OS closes them when the process terminates.
sourceraw docstring

file-inclj

(file-in env path)

Opens an input stream for file under path.

Opens an input stream for file under `path`.
sourceraw docstring

file-outclj

(file-out env path)

Opens an output stream for file under path.

Opens an output stream for file under `path`.
sourceraw docstring

flushclj

(flush env id)

Flushes the requested stream.

Flushes the requested stream.
sourceraw docstring

id-stderrclj

Id of STDERR.

Id of STDERR.
sourceraw docstring

inclj

(in env id)

Reads a single cell from the requested stream.

Reads a single cell from the requested stream.
sourceraw docstring

in+clj

(in+ env id)

Reads all available cells from the requested stream and closes it.

Reads all available cells from the requested stream and closes it.
sourceraw docstring

line+clj

(line+ env id)

Reads a line from the requested stream and parses it into a list of cells.

Reads a line from the requested stream and parses it into a list of cells.
sourceraw docstring

operationclj

(operation env id op+ f)

Generic function for carrying out an operation.

Retrieves the stream associated with id and executes (f env stream).

Takes care of failure.

Generic function for carrying out an operation.

Retrieves the stream associated with `id` and executes `(f env stream`).

Takes care of failure.
sourceraw docstring

outclj

(out env id cell)

Writes cell to the requested stream.

Writes `cell` to the requested stream.
sourceraw docstring

out!clj

(out! env id cell)

Like out but appends a new line and flushes the stream.

Like [[out]] but appends a new line and flushes the stream.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close