\r
<div class="para">\r
<h2>DIR</h2>\r
-<p>The <tt>DIR</tt> structure is used for the work area to read a directory by <tt>f_oepndir()/f_readdir()</tt> function. Application program must not modify any member in this structure.</p>\r
+<p>The <tt>DIR</tt> structure is used for the work area to read a directory by <tt>f_oepndir</tt>, <tt>f_readdir</tt>, <tt>f_findfirst</tt> and <tt>f_findnext</tt> function. Application program must not modify any member in this structure, or any data on the FAT volume can be collapsed.</p>\r
<pre>\r
<span class="k">typedef</span> <span class="k">struct</span> {\r
- FATFS* fs; <span class="c">/* Pointer to the owner file system object */</span>\r
- WORD id; <span class="c">/* Owner file system mount ID */</span>\r
- WORD index; <span class="c">/* Index of directory entry to start to search next */</span>\r
- DWORD sclust; <span class="c">/* Table start cluster (0:Root directory) */</span>\r
+ _FDID obj; <span class="c">/* Owner file sytem object and object identifier */</span>\r
+ DWORD dptr; <span class="c">/* Current read/write offset */</span>\r
DWORD clust; <span class="c">/* Current cluster */</span>\r
DWORD sect; <span class="c">/* Current sector */</span>\r
BYTE* dir; <span class="c">/* Pointer to the current SFN entry in the win[] */</span>\r
BYTE* fn; <span class="c">/* Pointer to the SFN buffer (in/out) {file[8],ext[3],status[1]} */</span>\r
-<span class="k">#if</span> _FS_LOCK\r
- UINT lockid; <span class="c">/* Sub-directory lock ID (0:Root directory) */</span>\r
-<span class="k">#endif</span>\r
<span class="k">#if</span> _USE_LFN\r
- WCHAR* lfn; <span class="c">/* Pointer to the LFN buffer (in/out) */</span>\r
- WORD lfn_idx; <span class="c">/* Index of the LFN entris (0xFFFF:No LFN) */</span>\r
+ DWORD blk_ofs; <span class="c">/* Offset of the entry block (0xFFFFFFFF:Invalid) */</span>\r
+ WCHAR* lfn; <span class="c">/* Pointer to the LFN working buffer (in/out) */</span>\r
+<span class="k">#endif</span>\r
+<span class="k">#if</span> _USE_FIND\r
+ const TCHAR* pat; <span class="c">/* Ponter to the matching pattern */</span>\r
<span class="k">#endif</span>\r
} DIR;\r
</pre>\r