Writes the characters from start
to end
of string
str
to output port out
, where start
defaults
to 0 and end
defaults to (string-length
.str
)
Read a line from the input port in
, defaulting to
(current-input-port)
, and return the result as
a string not including the newline. Reads at most n
characters, defaulting to 8192.
Reads n
characters from input-port in
,
defaulting to (current-input-port)
, and
returns the result as a string. Returns ""
if n
is zero. May return a string with fewer
than n
characters if the end of file is reached,
or the eof-object if no characters are available.
Reads n
characters from port in
, which
defaults to (current-input-port)
, and writes
them into the string str
starting at index 0.
Returns the number of characters read.
An error is signalled if the length of str
is smaller
than n
.
Sends the entire contents of a file or input port to an output port.
The fundamental port iterator.
read
is a procedure of three arguments:
(lambda (str start end) ...)
which should fill str
from
start
to end
with bytes, returning the actual number
of bytes filled.
write
is a procedure of three arguments:
(lambda (str start end) ...)
which should write the bytes of
str
from start
to end
, returning the actual
number of bytes written.
Similar to make-custom-input-port
but returns a binary
port, and read
receives a bytevector to fill instead of a
string.
Similar to make-custom-output-port
but returns a binary
port, and write
receives data from a bytevector instead of a
string.
A simple /dev/null port which accepts and does nothing with any data written to it.
A port to broadcast everything written to it to multiple output ports.
An output port which runs all output (in arbitrary string chunks)
through the filter
procedure.
An input port which acts as all of the ports
concatenated
together in order.
A /dev/null input port which always returns eof-object
.
A utility to represent a port generated in chunks by the thunk
generator
, which should return a single string representing
the next input to buffer, or #f
when there is no more
input.
Equivalent to make-generated-input-port
, but produces a
binary port, and generator
should return a bytevector or
#f
when there is no more input.
An input port which runs all input (in arbitrary string chunks)
through the filter
procedure.