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

Determines whether an HDF5 path is valid and, optionally, whether the path resolves to an HDF5 object

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

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

H5LT_PATH_VALID (loc_id, path, check_object_valid)

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">htri_t H5LTpath_valid ( hid_t loc_id, const char *path, hbool_t check_object_valid)</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 h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, &
                            errcode)
   INTEGER(HID_T)  , INTENT(IN)  :: loc_id       ! An identifier of an object 
                                                 ! in the file
   CHARACTER(LEN=*), INTENT(IN)  :: path         ! Path to the object to check, 
                                                 ! relative to loc_id
   LOGICAL         , INTENT(IN)  :: check_object_valid  
                                                 ! Indicates whether to determine 
                                                 ! whether final component of path
                                                 ! resolves to an object 
   LOGICAL         , INTENT(OUT) :: path_valid   ! Object status
   INTEGER         , INTENT(OUT) :: errcode      ! Error code: 0 on success 
                                                 ! and -1 on failure
END SUBROUTINE h5ltpath_valid_f</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t loc_idIN: An identifier of an object in the file
const char *pathIN: The path to the object to check 
Links in path may be of any type
hbool_t check_object_valid   IN: If TRUE, determine whether the final component of path resolves to an object; if FALSE, do not check

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

H5LT_PATH_VALID checks the validity of path relative to the identifier of an object, loc_id. Optionally, check_object_valid can be set to determine whether the final component of path resolves to an HDF5 object; if not, the final component is a dangling link.

The meaning of the function’s return value depends on the value of check_object_valid: 
If check_object_valid is set to FALSE  H5LT_PATH_VALID will check all links in path to verify that they exist. If all the links in path exist, the function will return TRUE; otherwise the function will return FALSE.

If check_object_valid is set to TRUE,   H5LT_PATH_VALID will first check the links in path, as described above. If all the links exist, check_object_valid will then determine whether the final component of path resolves to an actual HDF5 object.H5LT_PATH_VALID will return TRUE if all the links in path exist and the final component resolves to an actual object; otherwise, it will return FALSE.

path can be any one of the following:

  • An absolute path, which starts with a slash ( / ) indicating the file’s root group, followed by the members
  • A relative path with respect to loc_id
  • A dot ( . ), if loc_id is the object identifier for the object itself

If path is an absolute path, then loc_id can be an identifier for any object in the file as it is used only to identify the file. If path is a relative path, then loc_id must be a file or a group identifier.

Note

Note on Behavior Change:

The behavior of  H5LT_PATH_VALID was changed in the 1.10.0 release in the case where the root group, “/”, is the value of path. This change is described below: 

  1. Let loc_id denote a valid HDF5 file identifier, and let check_object_valid be set to true or false. A call to  H5LT_PATH_VALID with arguments loc_id, “/”, and check_object_valid returns a positive value; in other words,H5LTpath_valid(loc_id, "/", check_object_valid) returns a positive value. In HDF5 version 1.8.16, this function returns 0.
    Let ‘root’ denote a valid HDF5 group identifier that refers to the root group of an HDF5 file, and let check_object_valid be set to true or false. A call to H5LT_PATH_VALID with arguments ‘root’, “/”, and check_object_valid returns a positive value; in other words, H5LTpath_valid(root, "/", check_object_valid)returns a postive value. In HDF5 version 1.8.16, this function returns 0.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Upon success:

If check_object_valid is set to FALSE

Returns TRUE if the path is valid; otherwise returns FALSE.

If check_object_valid is set to TRUE

Returns TRUE if the path is valid and resolves to an HDF5 object; otherwise returns FALSE.

Upon error, 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
filepath

examples

hl/

h5

test/test_

subset

lite.c
showLineNumberstrue
lineStart

32

2089
progLang

cpp

plain
lineEnd

42

2090
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

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

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathhl/fortran/

examples

test/

compound

tstlite.

f90

F90
showLineNumberstrue
lineStart

25

1569
progLangplain
lineEnd

35

1573
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.10.0Function behavior changed in this release. See the “Note on Behavior Change” section above.