# PxIOFlush

> Source: https://manual.pvxplus.com/pxio-library/library-functions/miscellaneous-file-functions/pxioflush

## Description

Forces the system to write all updates to a file to disk. This can be used to make sure that critical updates are fully written to the file specified.

## Format

**int** **PxIOFlush(PxIOFileHandle handle);**

***Where:***

|  |  |
| --- | --- |
| **handle** | The handle of an open file |

## Return Value

If the function succeeds, a value of PXIO_SUCCESS_STATUS is returned; otherwise, an error value is returned. More information on the nature of the error can be found by calling **[PxIOGetError](https://manual.pvxplus.com/pxio-library/library-functions/error-functions/pxiogeterror)**.

Note:  
This function provides functionality similar to the PxPlus [FLUSH](https://manual.pvxplus.com/directives/flush) directive.
