FileTools
Flush
flush output for a buffered file
Calling Sequence
Parameters
Description
Examples
Flush(file, file2, ...)
file1, file2, ...
-
one or more names or file descriptors of open files to be flushed
The Flush(file1, file2, ...) command ensures that output, which has been written to the specified files that are assumed to have been opened either implicitly, by Text[Open] or by Binary[Open], is written to disk.
The Flush function does not return anything.
When a file is closed, it is automatically flushed.
FileToolsTextOpen⁡testfile:
FileToolsTextWriteString⁡testfile,This is a test\n
15
ifkernelopts⁡platform=windowsthenssystem⁡type testfileelsessystem⁡cat testfileendif
0,
FileToolsFlush⁡testfile
0,This is a test
FileToolsTextClose⁡testfile
See Also
file_types
FileTools[Binary][Close]
FileTools[Binary][Open]
FileTools[Text][Close]
FileTools[Text][Open]
FileTools[Text][WriteString]
IO_errors
Download Help Document