Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> HDF5 Management > h5ln

h5ln

Link an object to another one

Calling Sequence

h5ln(obj, linkname, destobj [, hard])
h5ln(obj, linkname, destname [, hard])
h5ln(obj, linkname, destfile, destname)
h5ln(filename, location, linkname, destname [, hard])
h5ln(filename, location, linkname, destfile, destname)

Arguments

obj

a H5Object

linkname

a string giving the link name

destobj

a H5Object

destfile

a string giving the destination filename

hard

a boolean

filename

a string giving the filename

location

a string giving the location in the file

Description

Create a hard, soft or external link. When destfile is given, it is always an external link. By default hard is set to false, so by default a soft link is created.

Soft links can be created even if the target does not exist.

Examples

// We create a HDF5 file
a = h5open(TMPDIR + "/test.h5");
b = h5open(TMPDIR + "/test1.h5");

// We create a group and a dataset
h5group(a, "Grp_1");
h5write(a.root.Grp_1, "Dset_1", [1 2 ; 3 4]);
h5group(b, "BGrp");
h5write(b("/BGrp"), "BDset", 11:18);
h5close(b)

// We create a second group and add a link
h5group(a, "Grp_2");
h5ln(a, "Hard_Link", "/Grp_1/Dset_1", %t)
h5ln(a, "Soft_Link", "/Grp_1/Dset_1")
h5ln(a, "External_Link", TMPDIR  +"/test1.h5", "/BGrp")

// We check
h5dump(a)

// Check the external link
a.root.External_Link.BDset.data

// We have finished so we free all the resources
h5close(a);

See Also

History

VersionDescription
5.5.0 HDF5 module introduced.
Report an issue
<< h5label HDF5 Management h5ls >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Apr 01 10:13:56 CEST 2015