<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css">
<title>
Gambas Documentation - MKDIR
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../help+en"><img class="flag" alt="Home" border="0" src="../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../lang+en">Up</a>&nbsp;
<a href="minute+en">Previous</a>&nbsp;
<a href="mod+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
MKDIR
</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax"><b>MKDIR</b> <u>sPath</u> AS String</pre><p>

Creates a directory.
<p>
If some parent directory of the specified path does not exist, then the
command fails.
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">MKDIR &quot;/tmp/xxnn&quot;</pre>
<p>
<div class="gray"><font size="-2"><b>Errors</b></font></div>
<table class="table" border="0" bordercolor="#000000" cellpadding="6" cellspacing="0" width="100%">
<tr><th>Message</th><th>Description</th></tr><tr class="dark"><td valign="top">
<a href="../error/access+en">Access forbidden (#43)</a>
</td><td valign="top">
The parent directory does not  allow  write  permission  to  the
process,  or  one  of  the directories in <u>sPath</u> did not allow
search permission.
</td></tr>
<tr><td valign="top">
<a href="../error/nexist+en">File or directory does not exist (#45)</a>
</td><td valign="top">
A  directory  component  in <u>sPath</u> does not exist or is a dangling symbolic link.
</td></tr>
<tr class="dark"><td valign="top">
<a href="../error/ndir+en">Not a directory (#49)</a>
</td><td valign="top">
A component used as a directory in <u>sPath</u> is not, in  fact, a directory.
</td></tr>
<tr><td valign="top">
<a href="../error/memory+en">Out of memory (#1)</a>
</td><td valign="top">
Insufficient kernel memory was available.
</td></tr>
<tr class="dark"><td valign="top">
<a href="../error/toolong+en">File name is too long (#44)</a>
</td><td valign="top">
<u>sPath</u> was too long.
</td></tr>
<tr><td valign="top">
<a href="../error/full+en">Device is full (#37)</a>
</td><td valign="top">
The device containing <u>sPath</u> has no room for  the  new  directory.
</td></tr>
<tr class="dark"><td valign="top">
<a href="../error/exist+en">File already exists (#38)</a>
</td><td valign="top">
<u>sPath</u> already exists (not necessarily as a directory). This includes the case where <u>sPath</u> is a symbolic link, dangling or not.
</td></tr>
<tr><td valign="top">
<a href="../error/system+en">System error... (#42)</a>
</td><td valign="top">
Other possible system errors:
<ul>
<li>Too many symbolic links were encountered in resolving  <u>sPath</u>.
<li>The filesystem containing pathname does not support the creation of directories.
<li><u>sPath</u> refers to a file on a read-only filesystem.
</ul>

</td></tr>
</table>
<p>
<hr><b>See also</b><br>
<a href="../cat/file+en">File &amp; Directory Functions</a>&nbsp;

</div>
</body>
</html>

