IDataWriter.FlushAsync method

Applies to Windows and Windows Phone

Flushes data asynchronously.

Syntax


IAsyncOperation<bool>^ FlushAsync()

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<Boolean>

The stream flush operation.

Remarks

The FlushAsync method ensures that the data has reached the target storage medium that the stream represents. For example, to improve application responsiveness and throughput, a file stream might respond to a write operation by copying the buffer into another temporary storage medium and returning immediately, while the target device begins writing the data concurrently.

The FlushAsync method doesn't complete until all data specified in previous write calls has reached the target storage medium. If the data can't be written, or an error occurred during a write operation, the method returns false.

For streams which write data immediately, FlushAsync has no effect and completes immediately.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage.Streams
Windows::Storage::Streams [C++]

Metadata

Windows.winmd

See also

IDataWriter

 

 

Show:
© 2014 Microsoft