Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Creates a hard link to an object

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5L_CREATE_HARD(obj_loc_id, obj_name, link_loc_id, link_name, lcpl_id, lapl_id)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">herr_t H5Lcreate_hard( hid_t obj_loc_id, const char *obj_name, hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id )</code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, &
                            hdferr, lcpl_id, lapl_id)
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: obj_loc_id  
                          ! The file or group identifier for the target object.
  CHARACTER(LEN=*), INTENT(IN) :: obj_name  
                          ! Name of the target object, which must already exist.
  INTEGER(HID_T), INTENT(IN) :: link_loc_id 
                          ! The file or group identifier for the new link.
  CHARACTER(LEN=*), INTENT(IN) :: link_name 
                          ! The name of the new link.
  INTEGER, INTENT(OUT) :: hdferr        
                          ! Error code: 
                          ! 0 on success and -1 on failure
  INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lcpl_id         
                          ! Link creation property list identifier.
  INTEGER(HID_T), OPTIONAL, INTENT(IN) ::   lapl_id         
                          ! Link access property list identifier.
END SUBROUTINE h5lcreate_hard_f</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t obj_loc_idIN: The location identifier for the target object; may be a file, group, dataset, named datatype or attribute identifier
const char *obj_name    IN: Name of the target object, which must already exist
hid_t link_loc_idIN: The file or group identifier for the new link; may be a file, group, dataset, named datatype or attribute identifier
const char * link_nameIN: The name of the new link
hid_t lcpl_idIN: Link creation property list identifier
hid_t lapl_idIN: Link access property list identifier

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

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_loc_id and obj_name specify the location and name, respectively, of the target object, i.e., the object that the new hard link points to.

link_loc_id and link_name specify the location and name, respectively, of the new hard link.

obj_name and link_name are interpreted relative to obj_loc_id and link_loc_id, respectively.

If obj_loc_id and link_loc_id are the same location, the HDF5 macro H5L_SAME_LOC can be used for either parameter (but not both).

lcpl_id and 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.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

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

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming Soon!

Comment
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
C
Release    Change
1.8.0Function introduced in this release.