1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> 5<meta http-equiv="Content-Style-Type" content="text/css" /> 6<title>FS_ReadDirectoryW</title> 7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" /> 8</head> 9<body> 10 11<h1>FS_ReadDirectoryW <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 12<h2>Syntax</h2> 13<pre><code> 14#include <nitro/fs.h> 15 16BOOL FS_ReadDirectory(<a href="../fs_file_type.html">FSFile</a> *dir, <a href="../FSDirectoryEntryInfo.html">FSDirectoryEntryInfo</a> *info); 17BOOL FS_ReadDirectoryW(<a href="../fs_file_type.html">FSFile</a> *file, <a href="../FSDirectoryEntryInfo.html">FSDirectoryEntryInfoW</a> *info); 18</code></pre> 19 20<h2>Arguments</h2> 21<table style="width:100%"> 22<tbody> 23<tr> 24<td style="width:13%"><CODE>dir</CODE></td> 25<td style="width:87%">The <A href="../fs_file_type.html"><CODE>FSFile</CODE></a> structure with the directory handle.</td> 26</tr> 27<tr> 28<td style="width:13%"><CODE>info</CODE></td> 29<td style="width:87%">The <a href="../FSDirectoryEntryInfo.html"><CODE>FSDirectoryEntryInfo</CODE></a> or <a href="../FSDirectoryEntryInfo.html"><CODE>FSDirectoryEntryInfoW</CODE></a> structure where the entry information should be stored when it is obtained.</td> 30</tr> 31</tbody> 32</table> 33 34<h2>Return Values</h2> 35<p>Returns TRUE if the entry information was obtained properly; returns FALSE otherwise. In case of failure, use <code><a href="../file/FS_GetResultCode.html">FS_GetResultCode()</a></code> to get the error details.</p> 36 37<h2>Description</h2> 38<p>Reads only one item of entry information from a directory handle. Each time this function is called, the list position within the directory will be incremented by one. After the final entry is reached, it will return FALSE. For example, let's say you use the <code><a href="FS_OpenDirectory.html">FS_OpenDirectory()</a></code> function to open a directory that contains three files. When you call this function using that handle, it will return a value of TRUE three times. It will return a value of FALSE the fourth time and thereafter.</p> 39<p>Use <CODE>Shift_JIS</CODE> with the <CODE>FS_ReadDirectory</CODE> function to get the entry information's <a href="../FSDirectoryEntryInfo.html"><CODE>longname</CODE></a> field. Use <CODE>UTF-16LE</CODE> with the <CODE>FS_ReadDirectoryW</CODE> function to get the same field. FAT file systems, such as <a href="../archive_sdmc_spec.html">SD Card archives</a>, may use characters that cannot be expressed with <CODE>Shift_JIS</CODE>.</p> 40<p>The entry information for TWL-only files is available even when the system is operating in NITRO mode. You can determine whether access to the file is actually possible by checking the <a href="../FSPathInfo.html">FS_ATTRIBUTE_IS_OFFLINE</a> flag of the <a href="../FSDirectoryEntryInfo.html">attributes</a> field. (For more information on the specification of TWL-only files, see the explanation about the <CODE>Put</CODE> parameter in <a href="../../tools/makerom.html">makerom.TWL</a>.)</p> 41 42<h2>Note</h2> 43<ul> 44<li>This function cannot be called from the interrupt handler (IRQ mode). Also, in some cases processing may not end if interrupts are left prohibited.</li> 45</ul> 46 47<h2>See Also</h2> 48<p><code><a href="../fs_file_type.html">FSFile</a><br /> <a href="../FSDirectoryEntryInfo.html">FSDirectoryEntryInfo</a> <br /> <a href="FS_OpenDirectory.html">FS_OpenDirectory</a><br /> <a href="FS_CloseDirectory.html">FS_CloseDirectory</a></code></p> 49 50<h2>Revision History</h2> 51<p> 522009/01/08 Added an explanation about TWL-only files.<br />2008/09/02 Added notes concerning a Unicode version of the function.<br />2007/09/18 Initial version. 53</p> 54<hr><p>CONFIDENTIAL</p></body> 55</html> 56