TBufferedFileStream.Flush procedure
Flushes modified pages in the buffer to the file stream.
Declaration
procedure FlushDescription
Flush is used to store modified pages in the internal
buffer to the file stream. Flush examines the pages in the buffer to
determine if any have been modified using
Write.
When a "dirty" page is found, the inherited Seek method is
called to position the stream to the location for the modified page. The
inherited Write method is called to store content in the
modified page buffer to the stream, and the modified flag for the
buffer page is reset.
Buffer pages which not been modified are not (re-)written to the file stream.
Errors
Flush raises an
EStreamError exception with the message
in SErrCacheUnableToWriteExpected when the number of bytes written
for a page does not match the allocated size for the page.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
