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

h5ls

List the content of an HDF5 object (group or dataset)

Syntax

content = h5ls(obj [, name [, filter]])
content = h5ls(filename, name [, filter])

Arguments

obj

a H5Object

name

a string giving the path to the object to list

filename

a string giving the filename

filter

a string giving the type to filter

content

a matrix of strings with 2 columns

Description

List the content of a group or a dataset. The first column gives the names and the second one the type of the listed element.

The filter can take one of the values 'group' (or 'g'), 'dataset' (or 'd'), 'type' (or 't') and 'attribute' (or 'a'). For example, if 'g' is given, only the groups will be returned.

Examples

x = int8(matrix(1:80, 10, 8));
save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones 	

// Open the created file
a = h5open(TMPDIR + "/x.sod");

// We list the content of a
h5ls(a)

// only the dataset
h5ls(a, ".", "d")

// only the attributes
h5ls(a, ".", "a");

// We can see a dataset named x, list it
h5ls(a.root.x) // a.root.x is equivalent to a("/x")

// 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-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:38 CEST 2016