## DIR

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 any data on the FAT volume can be collapsed.

    typedef struct {
        _FDID   obj;        /* Owner file sytem object and object identifier */
        DWORD   dptr;       /* Current read/write offset */
        DWORD   clust;      /* Current cluster */
        DWORD   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 _USE_LFN
        DWORD   blk_ofs;    /* Offset of the entry block (0xFFFFFFFF:Invalid) */
        WCHAR*  lfn;        /* Pointer to the LFN working buffer (in/out) */
    #endif
    #if _USE_FIND
        const TCHAR*  pat;  /* Ponter to the matching pattern */
    #endif
    } DIR;

Return