<?xml version="1.0" encoding="utf-8"?>
<!--
* Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
*
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
*
-->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="h5ls" xml:lang="en">
    <refnamediv>
        <refname>h5ls</refname>
        <refpurpose>List the content of an HDF5 object (group or dataset)</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            content = h5ls(obj [, name [, filter]])
            content = h5ls(filename, name [, filter])
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>obj</term>
                <listitem>
                    <para>a H5Object</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>name</term>
                <listitem>
                    <para>a string giving the path to the object to list</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>filename</term>
                <listitem>
                    <para>a string giving the filename</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>filter</term>
                <listitem>
                    <para>a string giving the type to filter</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>content</term>
                <listitem>
                    <para>a matrix of strings with 2 columns</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>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.</para>
        <para>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.</para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
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);
    ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="h5open">h5open</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.5.0</revnumber>
                <revremark>HDF5 module introduced.</revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>
