sfileinfo.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Style-Type" content="text/css">
  6. <link rel="up" title="FatFs" href="../00index_e.html">
  7. <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sfileinfo.html">
  8. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  9. <title>FatFs - FILINFO</title>
  10. </head>
  11. <body>
  12. <div class="para">
  13. <h2>FILINFO</h2>
  14. <p>The <tt>FILINFO</tt> structure holds a file information returned by <tt>f_readdir()</tt> and <tt>f_stat()</tt> function.</p>
  15. <pre>
  16. <span class="k">typedef struct</span> {
  17. DWORD fsize; <span class="c">/* File size */</span>
  18. WORD fdate; <span class="c">/* Last modified date */</span>
  19. WORD ftime; <span class="c">/* Last modified time */</span>
  20. BYTE fattrib; <span class="c">/* Attribute */</span>
  21. TCHAR fname[13]; <span class="c">/* Short file name (8.3 format) */</span>
  22. <span class="k">#if</span> _USE_LFN
  23. TCHAR* lfname; <span class="c">/* Pointer to the LFN buffer */</span>
  24. int lfsize; <span class="c">/* Size of the LFN buffer in unit of TCHAR */</span>
  25. <span class="k">#endif</span>
  26. } FILINFO;
  27. </pre>
  28. </div>
  29. <h4>Members</h4>
  30. <dl>
  31. <dt>fsize</dt>
  32. <dd>Indicates size of the file in unit of byte. Always zero for directories.</dd>
  33. <dt>fdate</dt>
  34. <dd>Indicates the date that the file was modified or the directory was created.<br>
  35. <dl>
  36. <dt>bit15:9</dt>
  37. <dd>Year origin from 1980 (0..127)</dd>
  38. <dt>bit8:5</dt>
  39. <dd>Month (1..12)</dd>
  40. <dt>bit4:0</dt>
  41. <dd>Day (1..31)</dd>
  42. </dl>
  43. </dd>
  44. <dt>ftime</dt>
  45. <dd>Indicates the time that the file was modified or the directory was created.<br>
  46. <dl>
  47. <dt>bit15:11</dt>
  48. <dd>Hour (0..23)</dd>
  49. <dt>bit10:5</dt>
  50. <dd>Minute (0..59)</dd>
  51. <dt>bit4:0</dt>
  52. <dd>Second / 2 (0..29)</dd>
  53. </dl>
  54. </dd>
  55. <dt>fattrib</dt>
  56. <dd>Indicates the file/directory attribute in combination of <tt>AM_DIR</tt>, <tt>AM_RDO</tt>, <tt>AM_HID</tt>, <tt>AM_SYS</tt> and <tt>AM_ARC</tt>.</dd>
  57. <dt>fname[]</dt>
  58. <dd>Indicates the file/directory name in 8.3 format null-terminated string. It is always returnd with upper case in non-LFN configuration but it can be returned with lower case in LFN configuration.</dd>
  59. <dt>lfname</dt>
  60. <dd>Pointer to the LFN buffer to store the read LFN. This member must be initialized by application prior to use this structure. Set null pointer if LFN is not needed. Not available in non-LFN configuration.</dd>
  61. <dt>lfsize</dt>
  62. <dd>Size of the LFN buffer in unit of TCHAR. This member must be initialized by application prior to use this structure. Not available in non-LFN configuration.</dd>
  63. </dl>
  64. <p class="foot"><a href="../00index_e.html">Return</a></p>
  65. </body>
  66. </html>