4bb2ec0c089d6ace255b6a3b41c0e105607d67f4
[scilab.git] / scilab / modules / fileio / help / en_US / directory / chdir.xml
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  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17 <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" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="chdir">
18     <refnamediv>
19         <refname>chdir</refname>
20         <refpurpose>changes Scilab current directory</refpurpose>
21     </refnamediv>
22     <refnamediv xml:id="cd">
23         <refname>cd</refname>
24         <refpurpose>changes Scilab current directory</refpurpose>
25     </refnamediv>
26     <refsynopsisdiv>
27         <title>Syntax</title>
28         <synopsis>b = chdir(path)
29             realpath = cd(path)
30             cd path
31         </synopsis>
32     </refsynopsisdiv>
33     <refsection>
34         <title>Arguments</title>
35         <variablelist>
36             <varlistentry>
37                 <term>b</term>
38                 <listitem>
39                     <para>
40                         a boolean  <constant>%t</constant> if <function>chdir</function> operation is ok
41                     </para>
42                 </listitem>
43             </varlistentry>
44             <varlistentry>
45                 <term>path</term>
46                 <listitem>
47                     <para>a character string</para>
48                 </listitem>
49             </varlistentry>
50             <varlistentry>
51                 <term>realpath</term>
52                 <listitem>
53                     <para>a character string, the real path name after pathname
54                         conversion (see below)
55                     </para>
56                 </listitem>
57             </varlistentry>
58         </variablelist>
59     </refsection>
60     <refsection>
61         <title>Description</title>
62         <para>Change the current Scilab directory to those given by
63             <varname>path</varname>.
64         </para>
65         <para>
66             <note>
67                 Note that path conversion is performed and for example
68                 <literal>SCI/modules/core/macros</literal> is a valid pattern for both Unix and Windows.
69                 If <varname>path</varname> is empty change to "home" directory.
70             </note>
71         </para>
72     </refsection>
73     <refsection>
74         <title>Examples</title>
75         <programlisting role="example"><![CDATA[
76 chdir(TMPDIR);
77 pwd
78 cd
79 cd SCI
80  ]]></programlisting>
81     </refsection>
82     <refsection role="see also">
83         <title>See also</title>
84         <simplelist type="inline">
85             <member>
86                 <link linkend="pwd">pwd</link>
87             </member>
88             <member>
89                 <link linkend="SCI">SCI</link>
90             </member>
91             <member>
92                 <link linkend="SCIHOME">SCIHOME</link>
93             </member>
94             <member>
95                 <link linkend="TMPDIR">TMPDIR</link>
96             </member>
97         </simplelist>
98     </refsection>
99 </refentry>