System::IO::FileStream::WriteAsync method

FileStream::WriteAsync method

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

TaskPtr System::IO::FileStream::WriteAsync(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t count, const Threading::CancellationToken &cancellationToken) override
ParameterTypeDescription
bufferconst ArrayPtr<uint8_t>&The array containing the bytes to write.
offsetint32_tA 0-based index of the elemnet in buffer at which the subrange to write begins.
countint32_tThe number of elements in the subrange to write.
cancellationTokenconst Threading::CancellationToken&The token to monitor for cancellation requests.

ReturnValue

A task that represents the asynchronous write operation.

See Also