Skip to main content

HDF5FlushFile

HDF5FlushFile [/A /Z ] fileID

The HDF5FlushFile operation flushes an HDF5 file previously opened by HDF5OpenFile or HDF5CreateFile. If /A is used, it flushs all open HDF5 files.

Flushing a file writes all modified data associated with the file to disk. This is usually not necessary as the file is automatically flushed when it is closed. In situations where you are writing data to a file over a long period of time, you may want to flush the file so that the data is preserved in the event of a power failure or crash.

Parameters

fileID is the file ID number returned by HDF5CreateFile or HDF5OpenFile.

If /A is used, fileID is ignored but must still be present. You can pass zero in this case.

Flags

/AFlush all open HDF5 files.
/ZSuppress error generation. Use this if you want to handle errors yourself.

Output Variables

HDF5FlushFile sets the following output variables:

V_FlagSet to zero if the operation succeeds, non-zero if it fails.

Example

Variable fileID
HDF5OpenFile /R fileID as "hd:Data:test.h5"
// ... write to file ...
HDF5FlushFile fileID
// ... some time later
HDF5CloseFile fileID

See Also

HDF5CreateFile, HDF5OpenFile, HDF5CloseFile