1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2008 - INRIA - Allan CORNET
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
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">
16 <refname>mkdir</refname>
17 <refpurpose>makes a new directory</refpurpose>
20 <title>Calling Sequence</title>
23 mkdir(parentdir, dirname)
25 [status, msg] = mkdir( ... )
29 <title>Arguments</title>
35 a character string: a directory to create.
40 <term>parentdir</term>
43 a character string: a directory in which the new directory <varname>dirname</varname> will be created.
51 an integer: the status of the operation.
59 a character string: a message about an error.
66 <title>Description</title>
68 <code>mkdir(dirname)</code> creates the directory <varname>dirname</varname> in the current directory, if <varname>dirname</varname> represents a relative path. Otherwise, <varname>dirname</varname> represents an absolute path and <function>mkdir</function> attempts to create the absolute directory <varname>dirname</varname>.
71 <code>mkdir(parentdir, dirname)</code> creates the directory <varname>dirname</varname> in the directory <varname>parentdir</varname> (if <varname>parentdir</varname> is not existing it will be created), where <varname>parentdir</varname> is an absolute or relative pathname.
74 <code>[status,msg] = mkdir(parentdir, dirname)</code> creates the directory <varname>dirname</varname> in the existing directory <varname>parentdir</varname>, returning the status and the message about an error.
77 <informaltable frame='all'>
80 <varname>status</varname>
83 <varname>msg</varname>
91 mkdir: An error occurred: A file with the same name already exists in dirname
100 mkdir: An error occurred: Impossible to create directory dirname
118 mkdir: An error occurred: This directory already exists in dirname
126 Whatever the operating system, if the creating of directory
127 succeeds, the <varname>status</varname> is 1 and the message
128 <varname>msg</varname> is empty.
132 <title>Examples</title>
133 <programlisting role="example">
136 mkdir(TMPDIR+"/mkdir_example_1")
137 status_2 = mkdir(TMPDIR+"/mkdir_example_2")
138 [status_3,msg_3] = mkdir(TMPDIR+"/mkdir_example_3")
140 // Absolute pathname (parentdir + dirname)
141 [status_4,msg_4] = mkdir(TMPDIR,"mkdir_example_4")
145 [status_5,msg_5] = mkdir("mkdir_example_5")
146 [status_6,msg_6] = mkdir("mkdir_example_5/mkdir_example_6")
150 <refsection role="see also">
151 <title>See Also</title>
152 <simplelist type="inline">
154 <link linkend="chdir">chdir</link>
157 <link linkend="dir">dir</link>
160 <link linkend="rmdir">rmdir</link>