Name: H5Glink2
Signature:
herr_t H5Glink2(H5G_link_t
link_type,
hid_t src_loc_id,
const char *current_name,
hid_t dst_loc_id,
const char *new_name
)
Purpose:
Creates a link of the specified
type from new_name
to current_name.
Description:
H5Glink2 creates a new name for an
object that has a current name, possibly one of many names it currently has.
If link_type is H5G_LINK_HARD, then current_name
must specify the name of an existing object. The current_name
is interpreted relative to src_loc_id while the new_name
is interpreted relative to dst_loc_id. The src_loc_id
and dst_loc_id are either file
identifiers or a group identifiers. src_loc_id and dst_loc_id have to be in the
same file. If dst_loc_id is H5G_SAME_LOC, it will be in the
same location as src_loc_id.
If link_type is H5G_LINK_SOFT, then current_name
can be anything and is interpreted at lookup time relative to the group which
contains the final component of new_name. For instance, if current_name
is ./foo,
new_name
is ./x/y/bar,
and a request is made for ./x/y/bar,
then the actual object looked up is ./x/y/./foo.
Parameters:
H5G_link_t link_type
IN: Link type. Possible values are H5G_LINK_HARD
and H5G_LINK_SOFT.
hid_t src_loc_id
IN: File or group identifier.
const char * current_name
IN: Name of the existing object if link is a hard link. Can be anything for the soft link.
hid_t dst_loc_id
IN: File or group identifier. A value of H5G_SAME_LOC
indicates the same location as
src_loc_id.
const char * new_name
IN: New name for the object.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Name: H5Gmove2
Signature:
herr_t H5Gmove2(hid_t
src_loc_id,
const char *src,
hid_t dst_loc_id,
const char *dst )
Purpose:
Renames and(or) relocate an object within an HDF5 file.
Description:
H5Gmove2 renames or relocates an
object within an HDF5 file. The original name, src, is unlinked from the group
graph and the new name, dst,
is inserted as an atomic operation. The src
object is interpreted relative to src_loc_id, while
the dst object is interpreted
relative to dst_loc_id. Both src_loc_id and dst_loc_id are file or
group identifiers. src_loc_id and dst_loc_id have to be in the
same file. If dst_loc_id is H5G_SAME_LOC, it will be in the
same location as src_loc_id.
Warning:
Exercise care in moving groups as
it is possible to render data in a file inaccessible with H5Gmove. See The
Group Interface in the HDF5 User's Guide.
Parameters:
hid_t src_loc_id
IN: File or group identifier of source object.
const char *src
IN: Object's original name.
hid_t dst_loc_id
IN: File or group identifier of destination object.
const char *dst
IN: Object's new name.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.