FILINFO

The FILINFO structure holds information about the object retrieved by f_readdir, f_findfirst, f_findnext and f_stat function. Be careful in the size of structure when LFN is enabled.

typedef struct {
    FSIZE_t fsize;               /* File size */
    WORD    fdate;               /* Last modified date */
    WORD    ftime;               /* Last modified time */
    BYTE    fattrib;             /* Attribute */
#if FF_USE_LFN
    TCHAR   altname[FF_SFN_BUF + 1]; /* Alternative object name */
    TCHAR   fname[FF_LFN_BUF + 1];   /* Primary object name */
#else
    TCHAR   fname[12 + 1];       /* Object name */
#endif
} FILINFO;

Members

fsize
Size of the file in unit of byte. FSIZE_t is an alias of integer type either DWORD(32-bit) or QWORD(64-bit) depends on the configuration option FF_FS_EXFAT. Do not care if the item is a sub-directory.
fdate
The date when the file was modified or the directory was created.
bit15:9
Year origin from 1980 (0..127)
bit8:5
Month (1..12)
bit4:0
Day (1..31)
ftime
The time when the file was modified or the directory was created.
bit15:11
Hour (0..23)
bit10:5
Minute (0..59)
bit4:0
Second / 2 (0..29)
fattrib
The attribute flags in combination of:
FlagMeaning
AM_RDORead-only. Write mode open and deleting is rejected.
AM_HIDHidden. Should not be shown in normal directory listing.
AM_SYSSystem. Used by system and should not be accessed.
AM_ARCArchive. Set on new creation or any modification to the file.
AM_DIRDirectory. This is not a file but a sub-directory container.
fname[]
Null-terminated object name. A null string is stored when no item to read and it indicates this structure is invalid. The size of fname[] and altname[] each can be configured in LFN configuration.
altname[]
Alternative object name is stored if available. This member is not available in non-LFN configuration.

Return