fatfs v0.12 April 12, 2016:
- Added support of exFAT file system. (_FS_EXFAT) - Added f_expand(). (_USE_EXPAND) - Changed some members in FINFO structure and behavior of f_readdir(). - Added an option _USE_CHMOD and removed an option _WORD_ACCESS. - Fixed errors in the case conversion teble of Unicode (cc*.c).
This commit is contained in:
1 parent
42df62dae6
commit
1eaa207f01
84 files changed
+3871
-2301
No files matched your search
+6
-9
@@ -73,23 +73,20 @@ FRESULT f_stat (
|
||||
|
||||
printf("Test for 'file.txt'...\n");
|
||||
|
||||
<span class="k">#if</span> _USE_LFN
|
||||
fno.lfname = 0;
|
||||
<span class="k">#endif</span>
|
||||
fr = f_stat("file.txt", &fno);
|
||||
switch (fr) {
|
||||
|
||||
case FR_OK:
|
||||
printf("Size: %u\n", fno.fsize);
|
||||
printf("Size: %lu\n", fno.fsize);
|
||||
printf("Timestamp: %u/%02u/%02u, %02u:%02u\n",
|
||||
(fno.fdate >> 9) + 1980, fno.fdate >> 5 & 15, fno.fdate & 31,
|
||||
fno.ftime >> 11, fno.ftime >> 5 & 63);
|
||||
printf("Attributes: %c%c%c%c%c\n",
|
||||
(fno.fattrib & AM_DIR) ? 'D' : '-',
|
||||
(fno.fattrib & AM_RDO) ? 'R' : '-',
|
||||
(fno.fattrib & AM_HID) ? 'H' : '-',
|
||||
(fno.fattrib & AM_SYS) ? 'S' : '-',
|
||||
(fno.fattrib & AM_ARC) ? 'A' : '-');
|
||||
(fno.fattrib & AM_DIR) ? 'D' : '-',
|
||||
(fno.fattrib & AM_RDO) ? 'R' : '-',
|
||||
(fno.fattrib & AM_HID) ? 'H' : '-',
|
||||
(fno.fattrib & AM_SYS) ? 'S' : '-',
|
||||
(fno.fattrib & AM_ARC) ? 'A' : '-');
|
||||
break;
|
||||
|
||||
case FR_NO_FILE:
|
||||
|
||||
Reference in new issue
Block a user