CFile:Flush
The Flush method commits data residing in operating system file buffer to the file attached to the CFile object.
bResult = CFile:Flush() |
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 fragment 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 |