a06d78e927aad9b74b8fe28534f23316c4902ebe
[scilab.git] / scilab / modules / fileio / help / en_US / mkdir.xml
1 <?xml version="1.0" encoding="windows-1251"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA - Allan CORNET
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:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="mkdir" xml:lang="en">
15     <refnamediv>
16         <refname>mkdir</refname>
17         <refpurpose>Make new directory</refpurpose>
18     </refnamediv>
19     <refsynopsisdiv>
20         <title>Calling Sequence</title>
21         <synopsis>
22             mkdir('dirname')
23             mkdir('parentdir','newdir')
24             status=mkdir( ... )
25             [status,msg]=mkdir( ... )
26         </synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Description</title>
30         <para>
31             <literal>mkdir('dirname')</literal> creates the directory <literal>dirname</literal> in the current
32             directory, if <literal>dirname</literal> represents a relative path. Otherwise, <literal>dirname</literal>
33             represents an absolute path and mkdir attempts to create the absolute
34             directory <literal>dirname</literal>
35         </para>
36         <para>
37             <literal>mkdir('parentdir', 'dirname')</literal> creates the directory <literal>dirname</literal> in the
38             existing directory <literal>parentdir</literal>, where <literal>parentdir</literal> is an absolute or relative
39             pathname.
40         </para>
41         <para>
42             <literal>[status,message] = mkdir(parentdir, 'dirname')</literal> creates the directory
43             <literal>dirname</literal> in the existing directory <literal>parentdir</literal>, returning the status, a
44             message. Here, status is 1 for success, 2 if it already exists, -2 if it
45             is a filename and 0 otherwise.
46         </para>
47     </refsection>
48     <refsection>
49         <title>Examples</title>
50         <programlisting role="example">
51             <![CDATA[ 
52 // Absolute pathname
53 mkdir(TMPDIR+"/mkdir_example_1")
54 status_2 = mkdir(TMPDIR+"/mkdir_example_2")
55 [status_3,msg_3] = mkdir(TMPDIR+"/mkdir_example_3")
56
57 // Absolute pathname (parentdir + dirname)
58 [status_4,msg_4] = mkdir(TMPDIR,"mkdir_example_4")
59
60 // Relative pathname
61 cd TMPDIR;
62 [status_5,msg_5] = mkdir("mkdir_example_5")
63 [status_6,msg_6] = mkdir("mkdir_example_5/mkdir_example_6")
64  ]]>
65         </programlisting>
66     </refsection>
67     <refsection role="see also">
68         <title>See Also</title>
69         <simplelist type="inline">
70             <member>
71                 <link linkend="cd">cd</link>
72             </member>
73             <member>
74                 <link linkend="dir">dir</link>
75             </member>
76             <member>
77                 <link linkend="rmdir">rmdir</link>
78             </member>
79         </simplelist>
80     </refsection>
81 </refentry>