Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#os4units]

DosFlush

Flushes buffers for a buffered filehandle

Declaration

Source position: amigados.pas line 2494

function DosFlush(

  Fh: LongInt

):LongBool;

Function result

0 on error. IoErr() gives additional information in that case.

Description

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.


Documentation generated on: 2021-07-30