語言

IsolatedStorageFileStream.Flush 方法

定義

清除此數據流的緩衝區,並導致任何緩衝的數據寫入檔案。

多載

名稱 Description
Flush(Boolean)

清除此數據流的緩衝區,並導致任何緩衝的數據寫入檔案,並清除所有中繼檔案緩衝區。

Flush()

清除此數據流的緩衝區,並導致任何緩衝的數據寫入檔案。

Flush(Boolean)

來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs

清除此數據流的緩衝區,並導致任何緩衝的數據寫入檔案,並清除所有中繼檔案緩衝區。

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

參數

flushToDisk
Boolean

true清除所有中間檔案緩衝區;否則,。 false

備註

當你想確保中間檔案緩衝區中所有緩衝資料都能寫入磁碟時,可以使用這個超載。

另請參閱

適用於

Flush()

來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs
來源:
IsolatedStorageFileStream.cs

清除此數據流的緩衝區,並導致任何緩衝的數據寫入檔案。

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

備註

因為緩衝區可以同時用於讀取或寫入,但不能同時執行兩者,因此 Flush 能執行兩個功能。 首先,先前寫入緩衝區的資料會被複製到檔案中,緩衝區會被清除。 其次,如果 CanSeek 且 true 資料先前已從檔案複製到緩衝區進行讀取,檔案中目前的位置會依緩衝區中未讀位元組數遞減。 然後緩衝區會被清除。

當你想確保中間檔案緩衝區中所有緩衝資料都寫入磁碟時,可以使用 Flush(Boolean) 方法超載。

另請參閱

適用於