/* Open an existing HDF5 file */
fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
/* Get the EOA stored in the file’s superblock */
H5Fget_eoa(fid, &stored_eoa);
/* Set the EOA */
H5Fincrement_filesize(fid, 512);
/* Close the file */
H5Fclose(fid);
/* Find out the file’s actual size (EOF): S */
/* S should equal to (stored_eoa + 512) */
|