Page tree

The license could not be verified: License Certificate has expired!









Removes the link to an object from a group

This function is deprecated in favor of the function H5L_DELETE.

H5G_UNLINK(loc_id, name)

herr_t H5Gunlink(hid_t loc_id, const char *name )

SUBROUTINE h5gunlink_f(loc_id, name, hdferr)
  INTEGER(HID_T), INTENT(IN) :: loc_id   ! File or group identifier
  CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the object to unlink 
  INTEGER, INTENT(OUT) :: hdferr         ! Error code 
                                         ! 0 on success and -1 on failure
END SUBROUTINE h5gunlink_f

hid_t loc_idIN: Identifier of the file or group containing the object
const char * name    IN: Name of the object to unlink

H5G_UNLINK removes the object specified by name from the group graph and decrements the link count for the object to which name points. This action eliminates any association between name and the object to which name pointed.

Object headers keep track of how many hard links refer to an object; when the link count reaches zero, the object can be removed from the file. Objects which are open are not removed until all identifiers to the object are closed.

If the link count reaches zero, all file space associated with the object will be released, i.e., identified in memory as freespace. If any object identifier is open for the object, the space will not be released until after the object identifier is closed.

Note that space identified as freespace is available for re-use only as long as the file remains open; once a file has been closed, the HDF5 library loses track of freespace. See “Freespace Management” in the HDF5 User's Guide for further details.

Exercise care in unlinking groups as it is possible to render data in a file inaccessible with H5G_UNLINK. See The Group Interface in the HDF5 User's Guide.

Returns a non-negative value if successful; otherwise returns a negative value.

Coming soon!


Release    Change
1.8.0Function deprecated in this release.

--- Last Modified: April 25, 2019 | 11:50 AM