Last modified: 17 March 2014

Name: H5Fget_intent

Signature:
herr_t H5Fget_intent(hid_t file_id, unsigned *intent)

Purpose:
Determines the read/write or read-only status of a file.

Description:
Given the identifier of an open file, file_id, H5Fget_intent retrieves the “intended access mode” flag passed with H5Fopen when the file was opened.

The value of the flag is returned in intent. Valid values are as follows:

H5F_ACC_RDWR File was opened with read/write access.
H5F_ACC_RDONLY File was opened with read-only access.

The function will not return an error if intent is NULL; it will simply do nothing.

Parameters:
hid_t file_id IN: File identifier for a currently-open HDF5 file.
unsigned *intent OUT: Intended access mode flag as originally passed with H5Fopen.

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

Fortran90 Interface:
None

History:
Release     Change
1.8.0 C function introduced in this release.