# h5ls

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

## Calling Sequence

                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

- h5open

## History

5.5.0
HDF5 module introduced.