AsyncFile.read

FileIoResult read(ubyte[] buffer, ulong offset) @trusted

Queue an async read operation.

The read is performed in a background thread. When complete, the registered onRead callback will be invoked with the data.

Parameters

bufferBuffer to read data into.
offsetFile offset to read from.

Returns

a FileIoResult: FileOutcome.PENDING if the operation was

queued, FileOutcome.COMPLETED if it finished synchronously, or a FileError payload.