Table 1. Access flags and modes
Access Flag Resulting Access Mode
H5F_ACC_EXCL If the file already exists, H5Fcreate fails. If the file does not exist, it is created and opened with read-write access. (Default)
H5F_ACC_TRUNC If the file already exists, the file is opened with read-write access, and new data will overwrite any existing data. If the file does not exist, it is created and opened with read-write access.
H5F_ACC_RDONLY An existing file is opened with read-only access. If the file does not exist, H5Fopen fails. (Default)
H5F_ACC_RDWR An existing file is opened with read-write access. If the file does not exist, H5Fopen fails.
Table 1. Access flags and modes Access Flag Resulting Access Mode H5F_ACC_EXCL If the file already exists, H5Fcreate fails. If the file does not exist, it is created and opened with read-write access. (Default) H5F_ACC_TRUNC If the file already exists, the file is opened with read-write access, and new data will overwrite any existing data. If the file does not exist, it is created and opened with read-write access. H5F_ACC_RDONLY An existing file is opened with read-only access. If the file does not exist, H5Fopen fails. (Default) H5F_ACC_RDWR An existing file is opened with read-write access. If the file does not exist, H5Fopen fails.