Skip to main content

HDF5CloseFile

HDF5CloseFile [ /A /Z ] fileID​

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

HDF5CloseFile also closes any groups that you opened via HDF5CreateGroup or HDF5OpenGroup but did not close via HDF5CloseGroup.

Parameters​

fileID is the file ID number returned by HDF5OpenFile.

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

Flags​

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

Details​

When the current experiment is closed (via New Experiment, Open Experiment or Revert Experiment or by quitting Igor) Igor automatically closes all open HDF5 files.

Output Variables​

HDF5CloseFile 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"
HDF5CloseFile fileID

See Also​

HDF5CreateFile, HDF5OpenFile, HDF5FlushFile, HDF5CreateGroup, HDF5OpenGroup, HDF5CloseGroup