]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/documents/doc/readdir.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / readdir.html
similarity index 71%
rename from fatfs/doc/en/readdir.html
rename to fatfs/documents/doc/readdir.html
index 235beee7e463de07a2dfe74fad4a7b6ed7947275..878cb022aa5a381b5a7c772efc61d62a8eb7299e 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
 <html lang="en">\r
 <head>\r
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
 <meta http-equiv="Content-Style-Type" content="text/css">\r
 <link rel="up" title="FatFs" href="../00index_e.html">\r
 <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/readdir.html">\r
@@ -26,9 +26,9 @@ FRESULT f_readdir (
 <h4>Parameters</h4>\r
 <dl class="par">\r
 <dt>dp</dt>\r
-<dd>Pointer to the open directory object or null pointer.</dd>\r
+<dd>Pointer to the open directory object.</dd>\r
 <dt>fno</dt>\r
-<dd>Pointer to the <a href="sfileinfo.html">file information structure</a> to store the information about read item.</dd>\r
+<dd>Pointer to the <a href="sfileinfo.html">file information structure</a> to store the information about read item. A null pointer rewinds the read index of the directory.</dd>\r
 </dl>\r
 </div>\r
 \r
@@ -49,19 +49,20 @@ FRESULT f_readdir (
 <div class="para desc">\r
 <h4>Description</h4>\r
 <p>The <tt>f_readdir</tt> function reads a directory item, informations about the object. All items in the directory can be read in sequence by <tt>f_readdir</tt> function calls. Dot entries (<tt>"."</tt> and <tt>".."</tt>) in the sub-directory are filtered out and they will never appear in the read items. When all directory items have been read and no item to read, a nul string is stored into the <tt>fno-&gt;fname[]</tt> without any error. When a null pointer is given to the <tt class="arg">fno</tt>, the read index of the directory object is rewinded.</p>\r
-<p>When support of long file name (LFN) is enabled, a member <tt>altname[]</tt> is defined in the file information structure to store the short file name of the object. In case of the some conditions listed below, short file name is stored into the <tt>fname[]</tt> and <tt>altname[]</tt> has a null string.</p>\r
+<p>When support of long file name (LFN) is enabled, a member <tt>altname[]</tt> is defined in the file information structure to store the short file name of the object. If the long file name is not accessible due to some reason listed below, short file name is stored to the <tt>fname[]</tt> and <tt>altname[]</tt> has a null string.</p>\r
 <ul>\r
-<li>The item has no long file name. (Not the case at exFAT volume)</li>\r
-<li>Setting of <tt>_MAX_LFN</tt> is insufficient for the long file name. (Not the case at <tt>_MAX_LFN == 255</tt>)</li>\r
-<li>The long file name contains any character not allowed in ANSI/OEM code. (Not the case at <tt>_LFN_UNICODE == 1</tt>)</li>\r
+<li>The item has no LFN. (Not the case at exFAT volume)</li>\r
+<li>Setting of <a href="config.html#max_lfn"><tt>FF_MAX_LFN</tt></a> is insufficient to handle the LFN. (Not the case at <tt>FF_MAX_LFN == 255</tt>)</li>\r
+<li>Setting of <a href="config.html#lfn_buf"><tt>FF_LFN_BUF</tt></a> is insufficient to store the LFN.</li>\r
+<li>The LFN contains any character not defined in current code page. (Not the case at <tt>FF_LFN_UNICODE &gt;= 1</tt>)</li>\r
 </ul>\r
-<p>There is a problem on reading a directory of exFAT volume. The exFAT does not support short file name. This means no name can be returned on the condition above. If it is the case, a "?" is returned as file name to indicate that the object is not accessible. To avoid this problem, configure FatFs <tt>_LFN_UNICODE = 1</tt> and <tt>_MAX_LFN = 255</tt> to support the full feature of LFN specification.</p>\r
+<p>There is a problem on reading a directory of exFAT volume. The exFAT does not support short file name. This means no name can be returned on the condition above. If it is the case, "?" is returned into the <tt>fname[]</tt> to indicate that the object is not accessible. To avoid this problem, configure FatFs <tt><a href="config.html#lfn_unicode">FF_LFN_UNICODE</a> &gt;= 1</tt> and <tt>FF_MAX_LFN == 255</tt> to support the full feature of LFN specification.</p>\r
 </div>\r
 \r
 \r
 <div class="para comp">\r
 <h4>QuickInfo</h4>\r
-<p>Available when <tt>_FS_MINIMIZE &lt;= 1</tt>.</p>\r
+<p>Available when <tt><a href="config.html#fs_minimize">FF_FS_MINIMIZE</a> &lt;= 1</tt>.</p>\r
 </div>\r
 \r
 \r
@@ -81,7 +82,7 @@ FRESULT scan_files (
     res = f_opendir(&amp;dir, path);                       <span class="c">/* Open the directory */</span>\r
     if (res == FR_OK) {\r
         for (;;) {\r
-            res = f_readdir(&amp;dir, &amp;fno);                   <span class="c">/* Read a directory item */</span>\r
+            res = <em>f_readdir</em>(&amp;dir, &amp;fno);                   <span class="c">/* Read a directory item */</span>\r
             if (res != FR_OK || fno.fname[0] == 0) break;  <span class="c">/* Break on error or end of dir */</span>\r
             if (fno.fattrib &amp; AM_DIR) {                    <span class="c">/* It is a directory */</span>\r
                 i = strlen(path);\r