stream-length ( stream -- n/f )
Factor handbook > Input and output > Streams > Stream protocol

Prev:tell-output ( -- n )


Vocabulary
io

Inputs and outputs
streama stream
n/fan integer or f


Word description
Returns the length of the data supplied by stream, or f if the stream is not seekable or has unknown length.

Notes
Stream seeking is not supported on streams that do not have a known length, e.g. TCP/IP streams.

See also
stream-seek, stream-tell, stream-seekable?

Definition

GENERIC: stream-length ( stream -- n/f )


Methods