1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>NANDCreateDirAsync</title>
9</head>
10
11<body>
12
13<h1>NANDCreateDirAsync</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/nand.h&gt;
18
19#define NAND_PERM_OTHER_READ   0x01
20#define NAND_PERM_OTHER_WRITE  0x02
21#define NAND_PERM_GROUP_READ   0x04
22#define NAND_PERM_GROUP_WRITE  0x08
23#define NAND_PERM_OWNER_READ   0x10
24#define NAND_PERM_OWNER_WRITE  0x20
25
26typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );
27
28s32 NANDCreateDirAsync( const char *path, u8 perm, u8 attr, NANDCallback cb, NANDCommandBlock *block );
29</pre></dd></dl>
30
31<h2>Arguments</h2>
32<p>
33<TABLE class="arguments" border="1" >
34  <tr>
35<TH>path</TH>
36<TD>Specifies the directory name.</TD>
37  </tr>
38  <tr>
39<TH>perm</TH>
40<TD>Directory permissions. Specified by taking the logical sum of <code>NAND_PERM_*</code>.</TD>
41  </tr>
42  <tr>
43<TH>attr</TH>
44<TD>Specifies the directory attributes.</TD>
45  </tr>
46  <tr>
47<TH>cb</TH>
48<TD>Callback function to call when this function completes processing.</TD>
49  </tr>
50  <tr>
51<TH>block</TH>
52<TD>Command block structure to be passed to the callback function.</TD>
53  </tr>
54</TABLE>
55</p>
56
57<h2>Return Values</h2>
58<p>
59The result codes that may be returned by <code>NANDCreateDirAsync</code> are listed below. Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally.
60<p>
61<code>
62NAND_RESULT_OK<br>
63NAND_RESULT_ACCESS<br>
64NAND_RESULT_ALLOC_FAILED<br>
65NAND_RESULT_BUSY<br>
66NAND_RESULT_INVALID<br>
67NAND_RESULT_FATAL_ERROR<br>
68</code>
69</p>
70<p>
71The result codes that may be passed to the callback function are listed below.
72</p>
73<p>
74<code>
75NAND_RESULT_OK<br>
76NAND_RESULT_ACCESS<br>
77NAND_RESULT_CORRUPT<br>
78NAND_RESULT_EXISTS<br>
79NAND_RESULT_INVALID<br>
80NAND_RESULT_MAXDEPTH<br>
81NAND_RESULT_MAXFILES<br>
82NAND_RESULT_NOEXISTS<br>
83NAND_RESULT_UNKNOWN<br>
84NAND_RESULT_FATAL_ERROR<br>
85</code>
86</p>
87</p>
88
89<H2>Description</H2>
90<p>
91Asynchronously creates a new directory. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full. The specified permissions and attributes are given to the directory. <font color="#ff0000">The directory must be granted at least the <CODE>NAND_PERM_OWNER_READ</CODE> permission.</font>If the <CODE>NAND_PERM_OWNER_READ</CODE> permission is not granted, the function will return <CODE>NAND_RESULT_INVALID</CODE>.
92</p>
93
94<p>
95This function updates the FAT of the Wii console NAND memory.
96</p>
97
98<h2>See Also</h2>
99<p class="reference">
100<a href="./NANDCreateDir.html">NANDCreateDir</a>,
101<a href="./NANDDelete.html">NANDDelete</a>,
102<a href="./NANDDeleteAsync.html">NANDDeleteAsync</a>
103</p>
104
105<H2>Revision History</H2>
106<p>
1072008/08/01 Revised the result codes that are passed to the callback function.<br>2008/05/13 Added description of the result codes passed to the callback function.<br>2008/04/23 Commented about updating the FAT.<br>2007/02/xx Added the <CODE>NAND_RESULT_MAXDEPTH</CODE> result code.<br>2006/11/13 Added an explanation about the need to grant <CODE>NAND_PERM_OWNER_READ</CODE> permission.<br>2006/08/30 Added the <CODE>NAND_RESULT_NOEXISTS</CODE> result code.<br>2006/06/16 Initial version.<BR>
108</p>
109
110<hr><p>CONFIDENTIAL</p></body>
111</html>
112