The DIR structure is used for the work area to read a directory by f_oepndir, f_readdir, f_findfirst and f_findnext function. Application program must not modify any member in this structure, or f_readdir function will not work properly.
typedef struct { FFOBJID obj; /* Object identifier */ DWORD dptr; /* Current read/write offset */ DWORD clust; /* Current cluster */ LBA_t sect; /* Current sector */ BYTE* dir; /* Pointer to the current SFN entry in the win[] */ BYTE* fn; /* Pointer to the SFN buffer (in/out) {file[8],ext[3],status[1]} */ #if FF_USE_LFN DWORD blk_ofs; /* Offset of the entry block (0xFFFFFFFF:Invalid) */ WCHAR* lfn; /* Pointer to the LFN working buffer (in/out) */ #endif #if FF_USE_FIND const TCHAR* pat; /* Ponter to the matching pattern */ #endif } DIR;