AsyncFile.write

FileIoResult write(scope const(ubyte)[] data, ulong offset) @trusted

Queue an async write operation.

The write is performed asynchronously. When complete, the registered onWrite callback will be invoked with bytes written.

data is copied (TERMINOLOGY.md). The caller may reuse the buffer immediately.

Parameters

dataData to write.
offsetFile offset to write to.

Returns

a FileIoResult: FileOutcome.PENDING if the operation was

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