Flushes buffers for a buffered filehandle
Source position: amigados.pas line 2494
function DosFlush( |
Fh: LongInt |
):LongBool; |
0 on error. IoErr() gives additional information in that case.
Flushes any pending writes on the file. If the file was used for input and there is still some data to read it tries to seek back to the expected position.
On Amiga calling DosFlush() from different tasks on the same file handle is serialised. This means that most of the time it is possible to do I/O in one task to a file handle where DosFlush() is being called in another task on that file handle. No multi-thread safety is guaranteed though and data may be lost if I/O is done in parallel from different tasks on the same file handle.