<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 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="basename" xml:lang="ja">
    <refnamediv>
        <refname>basename</refname>
        <refpurpose>ファイル名からディレクトリと接尾辞を取り除く</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>files= basename(files[,flag [,flagexpand]])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>パラメータ</title>
        <variablelist>
            <varlistentry>
                <term>files</term>
                <listitem>
                    <para>ファイル名の集合を指定する文字列行列.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>flag,flagexpand</term>
                <listitem>
                    <para>オプションの論理値パラメータ. (デフォルト値
                        <literal>%t</literal>).
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>files</term>
                <listitem>
                    <para>文字列行列.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            <literal>basename</literal> は指定したファイル名の
            エントリの基本部分を返します.
        </para>
        <para>
            <literal>flag</literal> が真の場合,ファイルは
            <literal>getos() == 'Windows'</literal>変数で指定した目標型にまず変換されます.
            さらに, <literal>flagexpand</literal>が真の場合,
            <literal>HOME</literal>, <literal>SCI</literal> または <literal>~</literal>
            のような基準となる変数は環境変数により展開されます.
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
files=basename('SCI/modules/fileio/macros/poo.sci')
files=basename('SCI/modules\fileio/macros/poo.sci')
files=basename('SCI/modules\fileio/macros/poo.sci.k')
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="listfiles">listfiles</link>
            </member>
            <member>
                <link linkend="pathconvert">pathconvert</link>
            </member>
            <member>
                <link linkend="fileparts">fileparts</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
