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

DOSFlush

Flushes buffers for a buffered filehandle

Declaration

Source position: amigados.pas line 2259

function DOSFlush(

  File_: Pointer

):LongBool;

Arguments

File_

  

Filehandle to flush.

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 AROS 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