FlushFile()
Forces data to be written to disk.
Syntax
[returnfield =] [callproc] flushfile(handle = handle)
returnfield
Specifies the name of field to which the result is returned. Integer.
handle
Specifies the file identifier used by the 4GL file access functions. Integer.
Description
The flushfile() built-in function flushes the file to disk; that is, it writes the data from an open file to disk. The file must have been previously opened with the openfile() function and the file's handle must be known to 4GL.
You can flush a file of any type or mode. Do not flush a file in read mode.
Use the flushfile() statement to force a write to disk when the operating system cannot write to disk. Do not flush a file before closing it, because the closefile() statement automatically flushes the file.
The procedure returns 0 if the function completes without error.
Example
Flushes the file identified by the integer in the variable fileno.
Callproc flushfile(handle = fileno)
Last modified date: 08/14/2024