IsolatedStorageFileStream.Flush Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Updates the file with the current state of the buffer then clears the buffer.

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

Syntax

Public Overrides Sub Flush
public override void Flush()

Remarks

Since a buffer can be used for either reading or writing, but not both simultaneously, Flush performs two functions. First, any data previously written to the buffer is copied to the file and the buffer is cleared. Second, if CanSeek is true and data was previously copied from the file to the buffer for reading, the current position within the file is decremented by the number of unread bytes in the buffer. The buffer is then cleared.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

IsolatedStorageFileStream Class

Flush Overload

System.IO.IsolatedStorage Namespace