zFlush

Flushes (or writes to disk) all updates that were made to an open file object.

Service:File System Services (64-Bit)
Version:OES 2

Syntax

#include <zPublics.h>

STATUS zFlush(
   Key_t   key);

Parameters

key

(IN) Specifies the file object to be flushed, as returned by zOpen or zCreate.

Return Values

zOK

The operation completed successfully.

non-0

An error occurred (see Section 4.1, Return Values for a description).

Remarks

If any file modifications are still in the cache, they are written to disk. zFlush blocks until the file flush is complete and then returns to the caller. zFlush should not be called as part of a transaction because the transaction could be aborted and might have extra work to do. The transaction automatically takes care of any flushing that needs to be done.

See Also

zClose, zCreate, zOpen, zRead, zSetEOF, zWrite