AsyncFile.write

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

Queue an async write operation.

The write is performed in a background thread. When complete, the registered onWrite callback will be invoked with bytes written.

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.