Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - Русский - 日本語

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

Aide de Scilab >> 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.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:54:34 CEST 2014