MAINSAIL Language Manual, Section 35.14

previous   next   top   contents   index   framed top   this page unframed


35.14. $flush

Temporary feature: subject to change

Figure 35–17. $flush
BOOLEAN
PROCEDURE   $flush      (POINTER(filef);

$flush writes all dirty buffers for the specified file f, whether or not f is cached. $flush works only for random-access files, not sequential files. An error message is issued if the argument is a file that was opened without the random bit.

$flush flushes the MAINSAIL random-access file cache, but it does not ensure that the operating system completes writing all flushed buffers to disk before returning. If you want to ensure that all flushed buffers are written to disk, you should follow a call to $flush with an FLI call to the appropriate system routine (e.g., sync or fsync on UNIX).


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 35.14