![]() |
HDF5
1.13.0
|
Group Interface. More...
Functions | |
hid_t | H5Gcreate2 (hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id) |
Creates a new group and links it into the file. More... | |
hid_t | H5Gopen2 (hid_t loc_id, const char *name, hid_t gapl_id) |
Opens an existing group in a file. More... | |
herr_t | H5Gclose (hid_t group_id) |
Closes the specified group. More... | |
Group Interface.
Closes the specified group.
[in] | group_id | Group identifier |
H5Gclose() releases resources used by a group which was opened by H5Gcreate() or H5Gopen() After closing a group, group_id
cannot be used again until another H5Gcreate() or H5Gopen() is called on it.
Failure to release a group with this call will result in resource leaks.
Creates a new group and links it into the file.
[in] | loc_id | Location identifier. The identifier may be that of a file, group, dataset, named datatype, or attribute. |
[in] | name | Name of the group to create |
[in] | lcpl_id | Link creation property list identifier |
[in] | gcpl_id | Group creation property list identifier |
[in] | gapl_id | Group access property list identifier |
H5Gcreate2() creates a new group in a file. After a group has been created, links to datasets and to other groups can be added.
The loc_id
and name
parameters specify where the group is located. loc_id
may be a file, group, dataset, named datatype or attribute in the file. If an attribute, dataset, or named datatype is specified for loc_id
then the group will be created at the location where the attribute, dataset, or named datatype is attached. name
is the link to the group; name
may be either an absolute path in the file (the links from the root group to the new group) or a relative path from loc_id
(the link(s) from the group specified by loc_id
to the new group).
lcpl_id
, gcpl_id
, and gapl_id
are property list identifiers. These property lists govern how the link to the group is created, how the group is created, and how the group can be accessed in the future, respectively. H5P_DEFAULT can be passed in if the default properties are appropriate for these property lists. Currently, there are no APIs for the group access property list; use H5P_DEFAULT.
To conserve and release resources, the group should be closed when access is no longer required.
Opens an existing group in a file.
[in] | loc_id | Location identifier. The identifier may be that of a file, group, dataset, named datatype, or attribute. |
[in] | name | Name of the group to open |
[in] | gapl_id | Group access property list identifier |
H5Gopen2() opens an existing group, name, at the location specified by loc_id
.
With default settings, H5Gopen2() provides similar functionality to that provided by H5Gopen(). The only difference is that H5Gopen2() can provide a group access property list, gapl_id
.
H5Gopen2() returns a group identifier for the group that was opened. This group identifier should be released by calling H5Gclose() when it is no longer needed.