FIL

FIL構造体は、f_open()で作成され、そのファイルの状態を保持します。アプリケーションから書き換え可能なメンバはありません。

typedef struct _FIL {
    FATFS*  fs;           /* Pointer to the owner file system object */
    WORD    id;           /* Owner file system mount ID */
    BYTE    flag;         /* File status flags */
    BYTE    csect;        /* Sector address in the cluster */
    DWORD   fptr;         /* File R/W pointer */
    DWORD   fsize;        /* File size */
    DWORD   org_clust;    /* File start cluster */
    DWORD   curr_clust;   /* Current cluster */
    DWORD   dsect;        /* Current data sector */
#if _FS_READONLY == 0
    DWORD   dir_sect;     /* Sector containing the directory entry */
    BYTE*   dir_ptr;      /* Ponter to the directory entry in the window */
#endif
#if !_FS_TINY
    BYTE    buf[_MAX_SS];  /* File R/W buffer */
#endif
} FIL;

戻る