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

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

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

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.
Report an issue
<< h5ln HDF5 Management h5mount >>

Copyright (c) 2022-2023 (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:
Thu Feb 14 14:57:21 CET 2019