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>NANDSetStatusAsync</title>
9</head>
10
11<body>
12
13<h1>NANDSetStatusAsync</h1>
14
15<h2>C Specification</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/nand.h&gt;
18
19typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );
20
21s32 NANDSetStatusAsync( const char *path, const NANDStatus *stat, NANDCallback cb, NANDCommandBlock *block );
22</code></pre></dd></dl>
23
24<h2>Arguments</h2>
25<p>
26<TABLE border="1" >
27  <tr>
28    <TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>path</EM></STRONG></CODE></TD>
29    <TD width="520">Specifies the path of the target file or directory.</TD>
30  </tr>
31  <tr>
32    <TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>stat</EM></STRONG></CODE></TD>
33    <TD width="520">Pointer to a <CODE>NANDStatus</CODE> structure.</TD>
34  </tr>
35  <tr>
36    <TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cb</EM></STRONG></CODE></TD>
37    <TD width="520">Callback function to call when this function completes processing.</TD>
38  </tr>
39  <tr>
40    <TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>block</EM></STRONG></CODE></TD>
41    <TD width="520">Command block structure to be passed to the callback function.</TD>
42  </tr>
43</TABLE>
44</p>
45
46<h2>Return Values</h2>
47<p>
48Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally.
49<p>
50<code>NAND_RESULT_OK<br> NAND_RESULT_ACCESS<br> NAND_RESULT_ALLOC_FAILED<br> NAND_RESULT_BUSY<br> NAND_RESULT_CORRUPT<br> NAND_RESULT_INVALID<br> NAND_RESULT_NOEXISTS<br> <S>NAND_RESULT_NOTEMPTY</S><br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code>
51</p>
52</p>
53
54<H2>Description</H2>
55<p>
56Sets the status of the specified file or directory asynchronously. This operation cannot be performed if the file or directory has an owner ID that is different from the owner ID of the application.<S> If this operation is performed on a file, the file size must be zero.</S> Permission can be specified with the <CODE>permission</CODE> member variable of the <CODE>NANDStatus</CODE> structure.  <font color=#ff0000>However, at a minimum the file or directory must be granted the <CODE>NAND_PERM_OWNER_READ</CODE> permission.</font> If <CODE>NAND_PERM_OWNER_READ</CODE> permission is not granted, the function will return <CODE>NAND_RESULT_INVALID</CODE>. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full.
57</p>
58
59<p>
60If this function is used on the home directory, the permissions will be initialized by the system when the application restarts. In order to avoid problems caused by the initialization of permissions, do not use this function on the home directory.
61</p>
62
63<h2>See Also</h2>
64<p>
65<code><a href="./NANDStatus.html">NANDStatus</a></code>, <code><a href="./NANDGetStatus.html">NANDGetStatus</a></code>, <code><a href="./NANDGetStatusAsync.html">NANDGetStatusAsync</a></code>, <code><a href="./NANDSetStatus.html">NANDSetStatus</a></code>
66</p>
67
68<H2>Revision History</H2>
69<p>
702007/12/10 Added a mention of the fact that the permissions for the home directory will be initialized by the system upon restarting.<br> 2006/11/13 Added explanation about the need to grant <CODE>NAND_PERM_OWNER_READ</CODE> permission.<br> 2006/11/13 Deleted the section about restrictions on file size.<br> 2006/06/16 Initial version.<br>
71</p>
72
73<hr><p>CONFIDENTIAL</p></body>
74</html>
75