<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) XXXX-2008 - INRIA
 *
 * 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="newest" xml:lang="pt">
    <refnamediv>
        <refname>newest</refname>
        <refpurpose>retorna o arquivo mais novo de um conjunto de
            arquivos
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Seqüência de Chamamento</title>
        <synopsis>k=newest(paths)
            k=newest(path1,path2,...,pathn)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Parâmetros</title>
        <variablelist>
            <varlistentry>
                <term>k</term>
                <listitem>
                    <para>o índice do arquivo mais novo</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>paths</term>
                <listitem>
                    <para>vetor de strings, paths(i) é o endereço do i-ésimo
                        arquivo
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>pathi</term>
                <listitem>
                    <para>string, o endereço do i-ésimo arquivo</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Descrição</title>
        <para>Dado um conjunto de endereços, newest retorna o índice do mais novo.
            Arquivos não existentes são supostos como mais antigos.
        </para>
    </refsection>
    <refsection>
        <title>Exemplos</title>
        <programlisting role="example"><![CDATA[
newest('SCI/modules/graphics/macros/bode.sci','SCI/modules/graphics/macros/bode.bin')
newest(['SCI/modules/graphics/macros/bode.sci','SCI/modules/graphics/macros/bode.bin'])
newest('SCI/modules/graphics/macros/bode.'+['sci','bin'])
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>Ver Também</title>
        <simplelist type="inline">
            <member>
                <link linkend="fileinfo">fileinfo</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
