H5L_CREATE_HARD creates a new hard link to a pre-existing object in an HDF5 file. The new link may be one of many that point to that object.
The target object must already exist in the file.
obj_name specify the location and name, respectively, of the target object, i.e., the object that the new hard link points to.
link_name specify the location and name, respectively, of the new hard link.
link_name are interpreted relative to
link_loc_id are the same location, the HDF5 macro
H5L_SAME_LOC can be used for either parameter (but not both).
lapl_id are the link creation and access property lists associated with the new link.
Hard and soft links are for use only if the target object is in the current file. If the desired target object is in a different file from the new link, an external link may be created with H5L_CREATE_EXTERNAL.
The HDF5 library keeps a count of all hard links pointing to an object; if the hard link count reaches zero (
0), the object will be deleted from the file. Creating new hard links to an object will prevent it from being deleted if other links are removed. The library maintains no similar count for soft links and they can dangle.