<?xml version="1.0" encoding="utf-8"?>
<!--
* Scilab ( http://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="h5exists" xml:lang="en">
    <refnamediv>
        <refname>h5exists</refname>
        <refpurpose>Test the existence of named object</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            b = h5exists(obj, locations)
            b = h5exists(obj, location, attrNames)
            b = h5exists(filename, locations)
            b = h5exists(filename, location, attrNames)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>obj</term>
                <listitem>
                    <para>a H5Object</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>locations</term>
                <listitem>
                    <para>a matrix of string containing the path to check</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>location</term>
                <listitem>
                    <para>a string giving the location where to check the attributes names</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>attrNames</term>
                <listitem>
                    <para>a matrix of string containing the attributes names to check</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>filename</term>
                <listitem>
                    <para>a string giving the filename</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>b</term>
                <listitem>
                    <para>a matrix of booleans</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>Check the existence of a named object or an attribute.</para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
x = 123;
y = 321;
save(TMPDIR + "/xy.sod", "x", "y");

// We open the file
a = h5open(TMPDIR + "/xy.sod", "r");

// Check existence of datasets "x", "y" and "z"
// "z" does not exist...
h5exists(a, ["x" "y" "z"])

// Check presence of Silab attributes
h5exists(a, "/", ["SCILAB_sod_version", "SCILAB_scilab_version"])

// 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>
            <member>
                <link linkend="h5get">h5get</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.5.0</revnumber>
                <revremark>HDF5 module introduced.</revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>
