IO Streams
License
Boost License 1.0.
Authors
Jason White

interface  Source;

A source is a stream that can be read from.


abstract size_t  read(ubyte[] buf);

Reads data into the specified buffer. The number of bytes  read is returned.


interface  Sink;

A sink is a stream that can be written to.


abstract size_t  write(in ubyte[] data);
alias  put = write;

Writes data to the stream. The number of bytes successfully written is returned.


interface  SourceSink: io.stream.interfaces.Source, io.stream.interfaces.Sink;

A stream that is both a Source and a Sink.


interface  Seekable(Stream): Stream;

A seekable stream can move the read/write starting position in the stream.


long  seekTo(long offset, From from = From.start);

Seeks to the specified offset relative to the given starting location.

Parameters
long offset The offset relative to from.
From from The relative position to seek to.