H5L: HDF5 Link Interface

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The Link interface, H5L, functions create and manipulate links in an HDF5 group. This interface includes functions that enable the creation and use of user-defined link classes.

Usage

1
2
3
4
5
6
H5Lcreate_external (target_file_name, target_obj_name, link_loc, link_name)
H5Lexists          (h5loc, name)
H5Lget_info        (h5loc, name)
H5Ldelete          (h5loc, name)
H5Lcopy            (h5loc, name, h5loc_dest, name_dest, lcpl = NULL, lapl = NULL )
H5Lmove            (h5loc, name, h5loc_dest, name_dest, lcpl = NULL, lapl = NULL )

Arguments

target_file_name

the relative or absoulte target file name containing the target object.

target_obj_name

the absolute path and name of the target object within the target file.

link_loc

An object of class H5IdComponent representing a H5 location identifier (file or group) where the new link is placed.

link_name

The name of the new link.

h5loc

An object of class H5IdComponent representing a H5 location identifier (file or group). See H5Fcreate, H5Fopen, H5Gcreate, H5Gopen to create an object of this kind.

h5loc_dest

An object of class H5IdComponent representing the destination file or group where a copied or moved link should be created.

name

The name of the link to be checked, copied or moved.

name_dest

The name of the link to be created when copying or moving.

lcpl

Link creation property list.

lapl

Link access property list.

Details

Interface to the HDF5 C-library libhdf5. See https://portal.hdfgroup.org/display/HDF5/Links for further details.

If name consists of a relative path containing group names, the function H5Lexists checks recursively if the links exists which is a different behaviour to the C-function.

Value

H5Lexists returns boolean TRUE if the link exists and FALSE otherwise.

H5Lget_info returns a list with the entries of the C-structure H5L_info_t.

Author(s)

Bernd Fischer, Mike Smith

References

https://portal.hdfgroup.org/display/HDF5

See Also

rhdf5

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# create an hdf5 file and a group
h5createFile("ex_H5L.h5")
h5createGroup("ex_H5L.h5","foo")

# reopen file and get link info
fid <- H5Fopen("ex_H5L.h5")
H5Lexists(fid, "foo")
H5Lexists(fid, "baa")
H5Lget_info(fid, "foo")

H5Ldelete(fid, "foo")
H5Lexists(fid, "foo")

H5Fclose(fid)

Example output

[1] TRUE
[1] TRUE
[1] TRUE
[1] FALSE
$type
[1] H5L_TYPE_HARD
Levels: H5L_TYPE_HARD H5L_TYPE_SOFT H5L_TYPE_EXTERNAL H5L_TYPE_ERROR

$corder_valid
[1] FALSE

$corder
[1] 0

$cset
[1] 0

[1] FALSE

rhdf5 documentation built on Nov. 8, 2020, 6:56 p.m.