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=utf-8">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>NANDGetType</title>
9</head>
10
11<body>
12
13<h1>NANDGetType</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">#include &lt;revolution/nand.h&gt;
17
18#define NAND_TYPE_FILE         0x01
19#define NAND_TYPE_DIR          0x02
20
21s32 NANDGetType( const char *path, u8 *type );
22</pre></dd></dl>
23
24<h2>Arguments</h2>
25<p>
26<TABLE class="arguments" border="1" >
27  <tr>
28<TH>path</TH>
29<TD>Specifies the bus name to be checked.</TD>
30  </tr>
31  <tr>
32<TH>type</TH>
33<TD>Pointer to a u8 variable that will store the obtained type (<CODE>NAND_TYPE_FILE</CODE> or <CODE>NAND_TYPE_DIR</CODE>).</TD>
34  </tr>
35</TABLE>
36</p>
37
38
39<h2>Return Values</h2>
40<p>
41Returns one of the following codes.
42<p>
43<code>NAND_RESULT_OK<br> NAND_RESULT_ACCESS<br> NAND_RESULT_ALLOC_FAILED<br> NAND_RESULT_BUSY<br> NAND_RESULT_INVALID<br> NAND_RESULT_NOEXISTS<br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code>
44</p>
45</p>
46
47<H2>Description</H2>
48<p>
49Checks whether the specified path name represents a file or a directory.
50</p>
51
52<p>
53This function sometimes puts the current thread to sleep, so it cannot be called from callback functions. For precautions related to calling similar functions, see <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.
54</p>
55
56<h2>See Also</h2>
57<p class="reference">
58<a href="./NANDGetTypeAsync.html">NANDGetTypeAsync</a><BR><a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>
59</p>
60
61<H2>Revision History</H2>
62<p>
632007/09/25 Added information about the sleep status of threads.<br>2006/11/30 Added the <CODE>NAND_RESULT_ALLOC_FAILED</CODE> and <CODE>NAND_RESULT_BUSY</CODE> codes.<br>2006/08/15 Initial version.<br>
64</p>
65
66<hr><p>CONFIDENTIAL</p></body>
67</html>