Xbasic
FILE.FLUSH Function
Syntax
V file_pointer.Flush()
Description
Flush contents of file to disk.
Discussion
The .FLUSH() method flushes output held in the disk cache, to assure all output is stored safely in the file referenced by the file object pointer before the file is closed.
Example
text = ui_get_text("Text", "Enter text:", "Value") file_pointer = FILE.create("c:\a5\flush.txt", FILE_RW_EXCLUSIVE) for i = 1 TO 50 file_pointer.write(text) next i file_pointer.flush()'write any buffered text to disk file_pointer.close()
See Also