~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/fileio/help/en_US/path_filename/dirname.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<!--
 
3
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 
4
 * Copyright (C) 2008 - INRIA
 
5
 * ...
 
6
 * 
 
7
 * This file must be used under the terms of the CeCILL.
 
8
 * This source file is licensed as described in the file COPYING, which
 
9
 * you should have received as part of this distribution.  The terms
 
10
 * are also available at    
 
11
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
12
 *
 
13
 -->
 
14
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="dirname">
 
15
    <refnamediv>
 
16
        <refname>dirname</refname>
 
17
        <refpurpose>gets directory from filenames</refpurpose>
 
18
    </refnamediv>
 
19
    <refsynopsisdiv>
 
20
        <title>Calling Sequence</title>
 
21
        <synopsis>dirs = dirname(files[, flag [,flagexpand]])</synopsis>
 
22
    </refsynopsisdiv>
 
23
    <refsection>
 
24
        <title>Arguments</title>
 
25
        <variablelist>
 
26
            <varlistentry>
 
27
                <term>files</term>
 
28
                <listitem>
 
29
                    <para>a string matrix giving a set of file names</para>
 
30
                </listitem>
 
31
            </varlistentry>
 
32
            <varlistentry>
 
33
                <term>flag, flagexpand</term>
 
34
                <listitem>
 
35
                    <para>
 
36
                        boolean optional parameters (default value <constant>%t</constant>)
 
37
                    </para>
 
38
                </listitem>
 
39
            </varlistentry>
 
40
            <varlistentry>
 
41
                <term>files, dirs</term>
 
42
                <listitem>
 
43
                    <para>string matrices</para>
 
44
                </listitem>
 
45
            </varlistentry>
 
46
        </variablelist>
 
47
    </refsection>
 
48
    <refsection>
 
49
        <title>Description</title>
 
50
        <para>
 
51
            <function>dirname</function> returns the directory names of the file entries given in <varname>files</varname>.
 
52
        </para>
 
53
        <para>
 
54
            If <varname>flag</varname> is true the files are first converted to the target 
 
55
            type given by the <code>getos() == 'Windows'</code> variable. 
 
56
            Moreover, if <varname>flagexpand</varname> is true leading strings like
 
57
            <literal>SCIHOME</literal>, <literal>SCI</literal> or <literal>~</literal> are expanded using environment
 
58
            variables.
 
59
        </para>
 
60
        <para>
 
61
            Note that <code>dirname(files,%f)</code> can give erroneous results if 
 
62
            pathnames given in <varname>files</varname> do not follow the convention 
 
63
            given by the <code>getos() == 'Windows'</code> variable.
 
64
        </para>
 
65
    </refsection>
 
66
    <refsection>
 
67
        <title>Examples</title>
 
68
        <programlisting role="example"><![CDATA[ 
 
69
dirs=dirname('SCI/modules/fileio/macros/poo.sci')
 
70
dirs=dirname('SCI/modules\fileio/macros/poo.sci')
 
71
dirs=dirname('SCI/modules\fileio/macros/poo.sci.k')
 
72
 ]]></programlisting>
 
73
    </refsection>
 
74
    <refsection role="see also">
 
75
        <title>See Also</title>
 
76
        <simplelist type="inline">
 
77
            <member>
 
78
                <link linkend="basename">basename</link>
 
79
            </member>
 
80
            <member>
 
81
                <link linkend="listfiles">listfiles</link>
 
82
            </member>
 
83
            <member>
 
84
                <link linkend="pathconvert">pathconvert</link>
 
85
            </member>
 
86
        </simplelist>
 
87
    </refsection>
 
88
</refentry>