sfileinfo.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 information about the object returned by <tt>f_readdir</tt>, <tt>f_findfirst</tt>, <tt>f_findnext</tt> and <tt>f_stat</tt> function.</p>
  15. <pre>
  16. <span class="k">typedef struct</span> {
  17. FSIZE_t 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. <span class="k">#if</span> _USE_LFN != 0
  22. TCHAR altname[13]; <span class="c">/* Alternative object name */</span>
  23. TCHAR fname[_MAX_LFN + 1]; <span class="c">/* Primary object name */</span>
  24. <span class="k">#else</span>
  25. TCHAR fname[13]; <span class="c">/* Object name */</span>
  26. <span class="k">#endif</span>
  27. } FILINFO;
  28. </pre>
  29. </div>
  30. <h4>Members</h4>
  31. <dl>
  32. <dt>fsize</dt>
  33. <dd>Indicates size of the file in unit of byte. <tt>FSIZE_t</tt> is an alias of integer type either <tt>DWORD</tt>(32-bit) or <tt>QWORD</tt>(64-bit) depends on the configuration option <tt>_FS_EXFAT</tt>. Do not care when the item is a directory.</dd>
  34. <dt>fdate</dt>
  35. <dd>Indicates the date when the file was modified or the directory was created.<br>
  36. <dl>
  37. <dt>bit15:9</dt>
  38. <dd>Year origin from 1980 (0..127)</dd>
  39. <dt>bit8:5</dt>
  40. <dd>Month (1..12)</dd>
  41. <dt>bit4:0</dt>
  42. <dd>Day (1..31)</dd>
  43. </dl>
  44. </dd>
  45. <dt>ftime</dt>
  46. <dd>Indicates the time when the file was modified or the directory was created.<br>
  47. <dl>
  48. <dt>bit15:11</dt>
  49. <dd>Hour (0..23)</dd>
  50. <dt>bit10:5</dt>
  51. <dd>Minute (0..59)</dd>
  52. <dt>bit4:0</dt>
  53. <dd>Second / 2 (0..29)</dd>
  54. </dl>
  55. </dd>
  56. <dt>fattrib</dt>
  57. <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>
  58. <dt>fname[]</dt>
  59. <dd>The null-terminated object name is stored. A null string is stored when no item to read and it indicates this structure is invalid.</dd>
  60. <dt>altname[]</dt>
  61. <dd>Alternative object name is stored if available. This member is not available at non-LFN configuration.</dd>
  62. </dl>
  63. <p class="foot"><a href="../00index_e.html">Return</a></p>
  64. </body>
  65. </html>