Namespace: joker.io
v1.0Contents
Summary
Provides basic interfaces to I/O primitives.
Index
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
(None.)
Functions, Macros, and Special Forms
-
close
Function v1.0(close f)
Closes f (IOWriter, IOReader, or File) if possible. Otherwise throws an error.
-
copy
Function v1.0(copy dst src)
Copies from src to dst until either EOF is reached on src or an error occurs.
Returns the number of bytes copied or throws an error.
src must be IOReader, e.g. as returned by joker.os/open.
dst must be IOWriter, e.g. as returned by joker.os/create. -
pipe
Function v1.0(pipe)
Pipe creates a synchronous in-memory pipe. It can be used to connect code expecting an IOReader
with code expecting an IOWriter.
Returns a vector [reader, writer]. -
read
Function v1.3.6(read r n)
Reads up to n bytes from IOReader r and returns a string of the read bytes.
May return a shorter (or blank) string if EOF is encountered.