日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

FATFS里的FILINFO结构体详解

發(fā)布時(shí)間:2025/6/15 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 FATFS里的FILINFO结构体详解 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
當(dāng)調(diào)用FatFS中的f_readdir函數(shù)返回FILINFO值的時(shí)候,大家如果直接看FILINFO里面的值可能看不懂。因?yàn)槔锩娴闹敌枰蠹肄D(zhuǎn)換一下,FILINFO的具體格式如下:
/* File information structure (FILINFO) */typedef struct {FSIZE_t fsize; /* File size */WORD fdate; /* Modified date */WORD ftime; /* Modified time */BYTE fattrib; /* File attribute */ #if FF_USE_LFNTCHAR altname[FF_SFN_BUF + 1];/* Altenative file name */TCHAR fname[FF_LFN_BUF + 1]; /* Primary file name */ #elseTCHAR fname[12 + 1]; /* File name */ #endif } FILINFO;The FILINFO structure holds a file information returned by f_stat and f_readdir function.
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_LFNTCHAR* lfname; /* Pointer to the LFN buffer */int lfsize; /* Size of the LFN buffer in unit of TCHAR */ #endif } FILINFO;Members
fsize:Indicates size of the file in unit of byte. Always zero for directories.
fdate:Indicates the date that 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:Indicates the time that 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:Indicates the file/directory attribute in combination of AM_DIR, AM_RDO, AM_HID, AM_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.


lfname:Pointer to the LFN buffer to store the read LFN. This member must be initialized by application prior ? ? ? ? ?to use this str ucture. Not available on non-LFN configuration.


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.

總結(jié)

以上是生活随笔為你收集整理的FATFS里的FILINFO结构体详解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。