[Overview][Constants][Classes][Index] |
Flushes modified pages in the buffer to the file stream
Source position: bufstream.pp line 135
public procedure TBufferedFileStream.Flush; |
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.
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.
|
Writes the specified number of bytes in Buffer to the internal page buffer(s) |
|