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

Procedure:

H5F_INCREMENT_FILESIZE (file_id, increment)

Signature:

<pre><code class="language-c">herr_t H5Fincrement_filesize(             
        hid_t file_id,              
        hsize_t increment     
)
</code></pre>

<pre><code class="language-fortran">Replace this text with the Fortran function signature</code></pre>

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:
ReleaseChange
1.10.2Function introduced in this release.