Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2025-11-11 The HDF5 Field Guide

- Main Page
- Getting started
- User Guide
- Reference Manual
- Cookbook
- Technical Notes
- RFCs
- Specifications
- Glossary
- Full-Text Search
- About

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
H5Gpublic.h File Reference
`#include "H5public.h"`
`#include "H5Ipublic.h"`
`#include "H5Lpublic.h"`
`#include "H5Opublic.h"`

## Data Structures
struct | H5G_info_t
struct | H5G_stat_t

## Macros
#define | H5G_LINK_ERROR H5L_TYPE_ERROR
#define | H5G_LINK_HARD H5L_TYPE_HARD
#define | H5G_LINK_SOFT H5L_TYPE_SOFT
#define | H5G_link_t H5L_type_t
#define | H5G_NLIBTYPES 8 /* Number of internal types */
#define | H5G_NTYPES 256 /* Max possible number of types */
#define | H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES)
#define | H5G_SAME_LOC H5L_SAME_LOC
#define | H5G_USERTYPE(X)

## Typedefs
typedef herr_t(* | H5G_iterate_t) (hid_t group, const char *name, void *op_data)

## Enumerations
enum | H5G_obj_t { H5G_UNKNOWN = -1 , H5G_GROUP , H5G_DATASET , H5G_TYPE , H5G_LINK , H5G_UDLINK , H5G_RESERVED_5 , H5G_RESERVED_6 , H5G_RESERVED_7 }
enum | H5G_storage_type_t { H5G_STORAGE_TYPE_UNKNOWN = -1 , H5G_STORAGE_TYPE_SYMBOL_TABLE , H5G_STORAGE_TYPE_COMPACT , H5G_STORAGE_TYPE_DENSE }

## Functions
herr_t | H5Gclose (hid_t group_id)
| Closes the specified group.
herr_t | H5Gclose_async (hid_t group_id, hid_t es_id)
hid_t | H5Gcreate1 (hid_t loc_id, const char *name, size_t size_hint)
| Creates a new group and links it into the file.
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.
hid_t | H5Gcreate_anon (hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
| Creates a new empty group without linking it into the file structure.
hid_t | H5Gcreate_async (hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t es_id)
herr_t | H5Gflush (hid_t group_id)
| Flushes all buffers associated with a group to disk.
int | H5Gget_comment (hid_t loc_id, const char *name, size_t bufsize, char *buf)
| Retrieves comment for specified object.
hid_t | H5Gget_create_plist (hid_t group_id)
| Gets a group creation property list identifier.
herr_t | H5Gget_info (hid_t loc_id, H5G_info_t *ginfo)
| Retrieves information about a group.
herr_t | H5Gget_info_async (hid_t loc_id, H5G_info_t *ginfo, hid_t es_id)
herr_t | H5Gget_info_by_idx (hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id)
| Retrieves information about a group, according to the group's position within an index.
herr_t | H5Gget_info_by_idx_async (hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id, hid_t es_id)
herr_t | H5Gget_info_by_name (hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id)
| Retrieves information about a group by its name.
herr_t | H5Gget_info_by_name_async (hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id, hid_t es_id)
herr_t | H5Gget_linkval (hid_t loc_id, const char *name, size_t size, char *buf)
| Returns the name of the object that the symbolic link points to.
herr_t | H5Gget_num_objs (hid_t loc_id, hsize_t *num_objs)
| Returns number of objects in the group specified by its identifier.
herr_t | H5Gget_objinfo (hid_t loc_id, const char *name, bool follow_link, H5G_stat_t *statbuf)
| Returns information about an object.
ssize_t | H5Gget_objname_by_idx (hid_t loc_id, hsize_t idx, char *name, size_t size)
| Returns the name of an object specified by an index.
H5G_obj_t | H5Gget_objtype_by_idx (hid_t loc_id, hsize_t idx)
| Returns the type of an object specified by an index.
herr_t | H5Giterate (hid_t loc_id, const char *name, int *idx, H5G_iterate_t op, void *op_data)
| Iterates over the entries of a group invoking a callback for each entry encountered.
herr_t | H5Glink (hid_t cur_loc_id, H5L_type_t type, const char *cur_name, const char *new_name)
| Creates a link of the specified type from `new_name` to `cur_name`.
herr_t | H5Glink2 (hid_t cur_loc_id, const char *cur_name, H5L_type_t type, hid_t new_loc_id, const char *new_name)
| Creates a link of the specified type from `cur_name` to `new_name`.
herr_t | H5Gmove (hid_t src_loc_id, const char *src_name, const char *dst_name)
| Renames an object within an HDF5 file.
herr_t | H5Gmove2 (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name)
| Renames an object within an HDF5 file.
hid_t | H5Gopen1 (hid_t loc_id, const char *name)
| Opens an existing group for modification and returns a group identifier for that group.
hid_t | H5Gopen2 (hid_t loc_id, const char *name, hid_t gapl_id)
| Opens an existing group in a file.
hid_t | H5Gopen_async (hid_t loc_id, const char *name, hid_t gapl_id, hid_t es_id)
herr_t | H5Grefresh (hid_t group_id)
| Refreshes all buffers associated with a group.
herr_t | H5Gset_comment (hid_t loc_id, const char *name, const char *comment)
| Sets comment for specified object.
herr_t | H5Gunlink (hid_t loc_id, const char *name)
| Removes the link to an object from a group.

## Macro Definition Documentation

## ◆ H5G_LINK_ERROR

#define H5G_LINK_ERROR H5L_TYPE_ERROR

## ◆ H5G_LINK_HARD

#define H5G_LINK_HARD H5L_TYPE_HARD

## ◆ H5G_LINK_SOFT

#define H5G_LINK_SOFT H5L_TYPE_SOFT

## ◆ H5G_link_t

#define H5G_link_t H5L_type_t

## ◆ H5G_NLIBTYPES

#define H5G_NLIBTYPES 8 /* Number of internal types */

## ◆ H5G_NTYPES

#define H5G_NTYPES 256 /* Max possible number of types */

## ◆ H5G_NUSERTYPES

#define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES)

## ◆ H5G_SAME_LOC

#define H5G_SAME_LOC H5L_SAME_LOC

## ◆ H5G_USERTYPE

#define H5G_USERTYPE | ( |  | X | ) |

Value:
(8 + (X)) /* User defined types */

## Typedef Documentation

## ◆ H5G_iterate_t

typedef herr_t(* H5G_iterate_t) (hid_t group, const char *name, void *op_data)

Callback for H5Giterate()

Deprecated

## Enumeration Type Documentation

## ◆ H5G_obj_t

enum H5G_obj_t

An object has a certain type. The first few numbers are reserved for use internally by HDF5. Users may add their own types with higher values. The values are never stored in the file – they only exist while an application is running. An object may satisfy the ‘isa’ function for more than one type.

Deprecated

Enumerator
H5G_UNKNOWN | Unknown object type
H5G_GROUP | Object is a group
H5G_DATASET | Object is a dataset
H5G_TYPE | Object is a named data type
H5G_LINK | Object is a symbolic link
H5G_UDLINK | Object is a user-defined link
H5G_RESERVED_5 | Reserved for future use
H5G_RESERVED_6 | Reserved for future use
H5G_RESERVED_7 | Reserved for future use

## ◆ H5G_storage_type_t

enum H5G_storage_type_t

Types of link storage for groups

Enumerator
H5G_STORAGE_TYPE_UNKNOWN | Unknown link storage type
H5G_STORAGE_TYPE_SYMBOL_TABLE | Links in group are stored with a "symbol table" (this is sometimes called "old-style" groups)
H5G_STORAGE_TYPE_COMPACT | Links are stored in object header
H5G_STORAGE_TYPE_DENSE | Links are stored in fractal heap & indexed with v2 B-tree