Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5F_INCREMENT_FILESIZE

Sets the file’s EOA to the maximum of (EOA, EOF) + increment

Procedure:

H5F_INCREMENT_FILESIZE (file_id, increment)

Signature:

herr_t H5Fincrement_filesize(             
        hid_t file_id,              
        hsize_t increment     
)

Parameters:


hid_t file_id   IN: Identifier of a currently-open HDF5 file
hsize_t *incrementIN: The number of bytes to be added to the maximum of (EOA, EOF)

Description:

H5F_INCREMENT_FILESIZE sets the file’s EOA to the maximum of (EOA, EOF) + increment.  The EOA is the end-of-file address stored in the file’s superblock while EOF is the file’s actual end-of-file.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

/* 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) */

 

History:

Release
C
1.10.2Function introduced in this release.

--- Last Modified: March 21, 2018 | 03:34 PM