FiberFile.read

ubyte[] read(ulong offset, size_t maxBytes = 4096) @trusted

Read up to maxBytes starting at offset. Yields until the read completes.

A GC-allocated buffer of up to maxBytes is returned. The actual length may be less than maxBytes if EOF was reached or fewer bytes were available.

Parameters

offsetFile offset to start reading from.
maxBytesMaximum number of bytes to read.

Returns

The data that was read. May be shorter than maxBytes on EOF.

Throws

FiberIoException on read error.