previous next top contents index framed top this page unframed
| Temporary feature: subject to change |
Figure 32–23. $clearFileCache
| BOOLEAN PROCEDURE $clearFileCache (POINTER(file) f; OPTIONAL BITS ctrlBits; OPTIONAL BOOLEAN unCacheFile; OPTIONAL LONG INTEGER pos); |
$clearFileCache removes some or all of f's buffers from the file cache LRU list, optionally writes dirty buffers, and optionally uncaches f (the file cache is explained in Section 22.16). f's current buffer is altered if necessary, as described below. If f is NULLPOINTER, an error occurs and $clearFileCache returns FALSE.
If f is not cached, $clearFileCache writes the current buffer of f and returns TRUE.
If f is cached, $clearFileCache removes from the LRU list all of f's buffers of which the buffer boundary is greater than or equal to pos. Dirty buffers removed from the LRU list are written if the delete bit is not set in ctrlBits.
If pos is non-Zero, then unCacheFile is ignored. Otherwise, if unCacheFile is TRUE, f is uncached (the current buffer is removed from the cache and f's cache is disposed of). If unCacheFile is FALSE, the current buffer remains cached.
Valid ctrlBits are errorOK and delete. An error message is generated if an error occurs and errorOK is not specified.
MAINSAIL Language Manual, Section 32.25