<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * ...
 *
 * 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:ns3="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="deletefile" xml:lang="ru">
    <refnamediv>
        <refname>deletefile</refname>
        <refpurpose>удаляет файл</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Синтаксис</title>
        <synopsis>f = deletefile(filename)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Аргументы</title>
        <variablelist>
            <varlistentry>
                <term>filename</term>
                <listitem>
                    <para>строка, имя файла (существующего или нет)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>f</term>
                <listitem>
                    <para>
                        логическое значение: <constant>%t</constant> или <constant>%f</constant>
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Описание</title>
        <para>
            Эта функция удаляет файл <varname>filename</varname>.
            Если файл <varname>filename</varname> удалён, то она возвращает
            <constant>%t</constant>, а иначе <constant>%f</constant>.
        </para>
    </refsection>
    <refsection>
        <title>Примеры</title>
        <programlisting role="example"><![CDATA[
fd = mopen(TMPDIR+'/filetodelete.txt','wt');
mclose(fd);

if (fileinfo(TMPDIR+'/filetodelete.txt') <> []) then
deletefile(TMPDIR+'/filetodelete.txt')
end

deletefile(TMPDIR+'/notexistingfile')
    ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>Смотрите также</title>
        <simplelist type="inline">
            <member>
                <link linkend="mdelete">mdelete</link>
            </member>
            <member>
                <link linkend="rmdir">rmdir</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>История</title>
        <revhistory>
            <revision>
                <revnumber>6.0.0</revnumber>
                <revremark>
                  Управление многомерными аргументами для удаления множества файлов одновременно.
                </revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>

