\r
<div class="para desc">\r
<h4>Description</h4>\r
-<p>The <tt>f_stat()</tt> function checks the existence of a file or sub-directory. If not exist, the function returns with <tt>FR_NO_FILE</tt>. If exist, the function returns with <tt>FR_OK</tt> and the informations of the object, file size, timestamp, attribute and SFN, are stored to the file information structure. For details of the file information, refer to the <tt>FILINFO</tt> structure and <a href="readdir.html"><tt>f_readdir()</tt></a> function.</p>\r
-<p>When LFN feature is enabled, <tt>lfname</tt> in the file information structure must be NULLed prior to use it.</p>\r
+<p>The <tt>f_stat</tt> function checks the existence of a file or sub-directory. If not exist, the function returns with <tt>FR_NO_FILE</tt>. If exist, the function returns with <tt>FR_OK</tt> and the informations of the object, file size, timestamp and attribute, are stored to the file information structure. For details of the file information, refer to the <tt>FILINFO</tt> structure and <a href="readdir.html"><tt>f_readdir</tt></a> function.</p>\r
</div>\r
\r
\r
\r
printf("Test for 'file.txt'...\n");\r
\r
-<span class="k">#if</span> _USE_LFN\r
- fno.lfname = 0;\r
-<span class="k">#endif</span>\r
fr = f_stat("file.txt", &fno);\r
switch (fr) {\r
\r
case FR_OK:\r
- printf("Size: %u\n", fno.fsize);\r
+ printf("Size: %lu\n", fno.fsize);\r
printf("Timestamp: %u/%02u/%02u, %02u:%02u\n",\r
(fno.fdate >> 9) + 1980, fno.fdate >> 5 & 15, fno.fdate & 31,\r
fno.ftime >> 11, fno.ftime >> 5 & 63);\r
printf("Attributes: %c%c%c%c%c\n",\r
- (fno.fattrib & AM_DIR) ? 'D' : '-',\r
- (fno.fattrib & AM_RDO) ? 'R' : '-',\r
- (fno.fattrib & AM_HID) ? 'H' : '-',\r
- (fno.fattrib & AM_SYS) ? 'S' : '-',\r
- (fno.fattrib & AM_ARC) ? 'A' : '-');\r
+ (fno.fattrib & AM_DIR) ? 'D' : '-',\r
+ (fno.fattrib & AM_RDO) ? 'R' : '-',\r
+ (fno.fattrib & AM_HID) ? 'H' : '-',\r
+ (fno.fattrib & AM_SYS) ? 'S' : '-',\r
+ (fno.fattrib & AM_ARC) ? 'A' : '-');\r
break;\r
\r
case FR_NO_FILE:\r