CFile:Flush
The Flush method commits data residing in operating system file buffer to the file attached to the CFile object.
bResult = CFile:Flush() |
On success, this method returns true.
On failure, including end-of-file, this method returns false.
The operating system buffers file access so that data are committed to the file only when the buffer becomes full. The Flush method causes the operating system to transfer the buffer contents to the file, regardless of whether the buffer is full.
Suppose a CFile named F exists and the file is open for writing. The script below writes formatted text to the file and then flushes the system file buffer:
|
|
|
-- do a formatted print to the file |
|
-- makes sure the data are in the file |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.