Please, help us to better know about our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5  1.13.2-1
Attribute and Link Creation Properties

Detailed Description

Currently, there are only two creation properties that you can use to control the creation of HDF5 attributes and links. The first creation property, the choice of a character encoding, applies to both attributes and links. The second creation property applies to links only, and advises the library to automatically create missing intermediate groups when creating new objects.

Functions

herr_t H5Pget_create_intermediate_group (hid_t plist_id, unsigned *crt_intmd)
 Determines whether property is set to enable creating missing intermediate groups. More...
 
herr_t H5Pset_create_intermediate_group (hid_t plist_id, unsigned crt_intmd)
 Specifies in property list whether to create missing intermediate groups. More...
 
herr_t H5Pget_char_encoding (hid_t plist_id, H5T_cset_t *encoding)
 Retrieves the character encoding used to create a link or attribute name. More...
 
herr_t H5Pset_char_encoding (hid_t plist_id, H5T_cset_t encoding)
 Sets the character encoding used to encode link and attribute names. More...
 

Function Documentation

◆ H5Pget_char_encoding()

herr_t H5Pget_char_encoding ( hid_t  plist_id,
H5T_cset_t encoding 
)

Retrieves the character encoding used to create a link or attribute name.

Parameters
[in]plist_idLink creation or attribute creation property list identifier
[out]encodingString encoding character set
Returns
Returns a non-negative value if successful; otherwise returns a negative value.

H5Pget_char_encoding() retrieves the character encoding used to encode link or attribute names that are created with the property list plist_id.

Valid values for encoding are defined in H5Tpublic.h and include the following:

H5T_CSET_ASCIIUS ASCII
H5T_CSET_UTF8UTF-8 Unicode encoding
Note
H5Pget_char_encoding() retrieves the character set used for an HDF5 link or attribute name while H5Tget_cset() retrieves the character set used in a character or string datatype.
Since
1.8.0

◆ H5Pget_create_intermediate_group()

herr_t H5Pget_create_intermediate_group ( hid_t  plist_id,
unsigned *  crt_intmd 
)

Determines whether property is set to enable creating missing intermediate groups.

Parameters
[in]plist_idLink creation property list identifier
[out]crt_intmdFlag specifying whether to create intermediate groups upon creation of an object
Returns
Returns a non-negative value if successful; otherwise returns a negative value.

H5Pget_create_intermediate_group() determines whether the link creation property list plist_id is set to allow functions that create objects in groups different from the current working group to create intermediate groups that may be missing in the path of a new or moved object.

Functions that create objects in or move objects to a group other than the current working group make use of this property. H5Gcreate_anon() and H5Lmove() are examples of such functions.

If crt_intmd is positive, missing intermediate groups will be created; if crt_intmd is non-positive, missing intermediate groups will not be created.

Since
1.8.0

◆ H5Pset_char_encoding()

herr_t H5Pset_char_encoding ( hid_t  plist_id,
H5T_cset_t  encoding 
)

Sets the character encoding used to encode link and attribute names.

Parameters
[in]plist_idLink creation or attribute creation property list identifier
[in]encodingString encoding character set
Returns
Returns a non-negative value if successful; otherwise returns a negative value.

H5Pset_char_encoding() sets the character encoding used for the names of links (which provide the names by which objects are referenced) or attributes created with the property list plist_id.

Valid values for encoding include the following:

H5T_CSET_ASCIIUS ASCII
H5T_CSET_UTF8UTF-8 Unicode encoding

For example, if the character set for the property list plist_id is set to H5T_CSET_UTF8, link names pointing to objects created with the link creation property list plist_id will be encoded using the UTF-8 character set. Similarly, names of attributes created with the attribute creation property list plist_id will be encoded as UTF-8.

ASCII and UTF-8 Unicode are the only currently supported character encodings. Extended ASCII encodings (for example, ISO 8859) are not supported. This encoding policy is not enforced by the HDF5 library. Using encodings other than ASCII and UTF-8 can lead to compatibility and usability problems.

Note
H5Pset_char_encoding() sets the character set used for an HDF5 link or attribute name while H5Tset_cset() sets the character set used in a character or string datatype.
Since
1.8.0

◆ H5Pset_create_intermediate_group()

herr_t H5Pset_create_intermediate_group ( hid_t  plist_id,
unsigned  crt_intmd 
)

Specifies in property list whether to create missing intermediate groups.

Parameters
[in]plist_idLink creation property list identifier
[in]crt_intmdFlag specifying whether to create intermediate groups upon the creation of an object
Returns
Returns a non-negative value if successful; otherwise returns a negative value.

H5Pset_create_intermediate_group()

Since