Opens an object in an HDF5 file by location identifier and path name
Procedure:
H5O_OPEN(loc_id, name, lapl_id)
Signature:
hid_t H5Oopen( hid_t loc_id, const char *name, hid_t lapl_id )
SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id)
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER(HID_T) , INTENT(OUT) :: obj_id
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id
Parameters:
hid_t loc_id | IN: Location identifier; may be a file, group, dataset, named datatype or attribute identifier |
const char *name | IN: Path to the object, relative to loc_id |
hid_t lapl_id | IN: Access property list identifier for the link pointing to the object |
Description:
H5O_OPEN opens a group, dataset, or committed (named) datatype specified by a location, loc_id
, and a path name, name
, in an HDF5 file.
This function opens the object in the same manner as H5G_OPEN, H5T_OPEN, and H5D_OPEN. However, H5O_OPEN does not require the type of object to be known beforehand. This can be useful with user-defined links, for instance, when only a path may be known. H5O_OPEN cannot be used to open a dataspace, attribute, property list, or file.
Once an object of unknown type has been opened with H5O_OPEN, the type of that object can be determined by means of an H5I_GET_TYPE call.
loc_id
can be either a file or group identifier. name
must be the path to that object relative to loc_id
.
lapl_id
is the link access property list associated with the link pointing to the object. If default link access properties are appropriate, this can be passed in as H5P_DEFAULT
.
When it is no longer needed, the opened object should be closed with H5O_CLOSE, H5G_CLOSE, H5T_CLOSE, or H5D_CLOSE.
Returns:
Returns an object identifier for the opened object if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.8.1 | Fortran subroutine introduced in this release. |
1.8.0 | Function introduced in this release. |
--- Last Modified: April 25, 2019 | 01:27 PM