H5Gcreate
(hid_t loc_id
,
const char *name
,
size_t size_hint
)
H5Gcreate
creates a new group with the specified
name at the specified location, loc_id
.
The location is identified by a file or group identifier.
The name, name
, must not already be taken by some
other object and all parent groups must already exist.
size_hint
is a hint for the number of bytes to
reserve to store the names which will be eventually added to
the new group. Passing a value of zero for size_hint
is usually adequate since the library is able to dynamically
resize the name heap, but a correct hint may result in better
performance.
If a non-positive value is supplied for size_hint
,
then a default size is chosen.
The length of a group name, or of the name of any object within a group, is not limited.
The return value is a group identifier for the open group.
This group identifier should be closed by calling
H5Gclose
when it is no longer needed.
hid_t loc_id |
IN: File or group identifier. |
const char *name |
IN: Absolute or relative name of the new group. |
size_t size_hint |
IN: Optional parameter indicating the number of bytes to reserve for the names that will appear in the group. A conservative estimate could result in multiple system-level I/O requests to read the group name heap; a liberal estimate could result in a single large I/O request even when the group has just a few names. HDF5 stores each name with a null terminator. |
SUBROUTINE h5gcreate_f(loc_id, name, gr_id, hdferr, size_hint) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group to be created INTEGER(HID_T), INTENT(OUT) :: gr_id ! Group identifier INTEGER, INTENT(OUT) :: hdferr ! Error code ! 0 on success and -1 on failure INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint ! Number of bytes to store the names ! of objects in the group. ! Default value is ! OBJECT_NAMELEN_DEFAULT_F END SUBROUTINE h5gcreate_f