现在的位置: 首页 > 综合 > 正文

fatfs里的结构体 —— 之FILINFO

2019年03月23日 ⁄ 综合 ⁄ 共 1315字 ⁄ 字号 评论关闭

总结的。

http://blog.csdn.net/dongpanshan/article/details/7942230

typedef struct {
    DWORD fsize;      /* File size */
    WORD  fdate;      /* Last modified date */
    WORD  ftime;      /* Last modified time */
    BYTE  fattrib;    /* Attribute */
    TCHAR fname[13];  /* Short file name (8.3 format) */
#if _USE_LFN
    TCHAR* lfname;    /* Pointer to the LFN buffer */
    int   lfsize;     /* Size of the LFN buffer in unit of TCHAR */
#endif
} FILINFO;

fsize
Indicates size of the file in unit of byte. Always zero for directories. 
文件字节数。目录的大小是0
fdate
Indicates the date that the file was modified or the directory was created.
文件最后一次修改/目录创建的date
bit15:9
Year origin from 1980 (0..127)
bit8:5
Month (1..12)
bit4:0
Day (1..31)
ftime
Indicates the time that the file was modified or the directory was created.
文件最后一次修改/目录创建的time
bit15:11
Hour (0..23)
bit10:5
Minute (0..59)
bit4:0
Second / 2 (0..29)
fattrib
Indicates the file/directory attribute in combination of AM_DIRAM_RDOAM_HIDAM_SYS and AM_ARC.
属性:目录,只读,隐藏,系统,存档。
fname[]
Indicates the file/directory name in 8.3 format null-terminated string. It is always returnd with upper case on non-LFN configuration but it can be returned with lower case on LFN configuration.
8.3 format即短文件名
lfname
Pointer to the LFN buffer to store the read LFN. This member must be initialized by application prior to use this structure. Not available on non-LFN configuration.
长文件名指针(LFN)
lfsize
Size of the LFN buffer in unit of TCHAR. This member must be initialized by application prior to use this structure. Not available on non-LFN configuration. 
长文件名大小

抱歉!评论已关闭.