Breyta

Deila með


IsolatedStorageFileStream.Flush Method

Definition

Clears buffers for this stream and causes any buffered data to be written to the file.

Overloads

Flush(Boolean)

Clears buffers for this stream and causes any buffered data to be written to the file, and also clears all intermediate file buffers.

Flush()

Clears buffers for this stream and causes any buffered data to be written to the file.

Flush(Boolean)

Source:
IsolatedStorageFileStream.cs
Source:
IsolatedStorageFileStream.cs
Source:
IsolatedStorageFileStream.cs

Clears buffers for this stream and causes any buffered data to be written to the file, and also clears all intermediate file buffers.

public:
 override void Flush(bool flushToDisk);
public override void Flush (bool flushToDisk);
override this.Flush : bool -> unit
Public Overrides Sub Flush (flushToDisk As Boolean)

Parameters

flushToDisk
Boolean

true to flush all intermediate file buffers; otherwise, false.

Remarks

Use this overload when you want to ensure that all buffered data in intermediate file buffers is written to disk.

See also

Applies to

Flush()

Source:
IsolatedStorageFileStream.cs
Source:
IsolatedStorageFileStream.cs
Source:
IsolatedStorageFileStream.cs

Clears buffers for this stream and causes any buffered data to be written to the file.

public:
 override void Flush();
public override void Flush ();
override this.Flush : unit -> unit
Public Overrides Sub Flush ()

Remarks

Because 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.

Use the Flush(Boolean) method overload when you want to ensure that all buffered data in intermediate file buffers is written to disk.

See also

Applies to