]> cloudbase.mooo.com Git - z180-stamp.git/blob - fatfs/documents/doc/sfileinfo.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / sfileinfo.html
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=utf-8">
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
12 <body>
13
14 <div class="para">
15 <h2>FILINFO</h2>
16 <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. Be careful in the size of structure when LFN is enabled.</p>
17 <pre>
18 <span class="k">typedef struct</span> {
19 FSIZE_t fsize; <span class="c">/* File size */</span>
20 WORD fdate; <span class="c">/* Last modified date */</span>
21 WORD ftime; <span class="c">/* Last modified time */</span>
22 BYTE fattrib; <span class="c">/* Attribute */</span>
23 <span class="k">#if</span> FF_USE_LFN
24 TCHAR altname[FF_SFN_BUF + 1]; <span class="c">/* Alternative object name */</span>
25 TCHAR fname[FF_LFN_BUF + 1]; <span class="c">/* Primary object name */</span>
26 <span class="k">#else</span>
27 TCHAR fname[12 + 1]; <span class="c">/* Object name */</span>
28 <span class="k">#endif</span>
29 } FILINFO;
30 </pre>
31 </div>
32
33 <h4>Members</h4>
34 <dl>
35 <dt>fsize</dt>
36 <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>FF_FS_EXFAT</tt>. Do not care when the item is a directory.</dd>
37 <dt>fdate</dt>
38 <dd>Indicates the date when the file was modified or the directory was created.<br>
39 <dl>
40 <dt>bit15:9</dt>
41 <dd>Year origin from 1980 (0..127)</dd>
42 <dt>bit8:5</dt>
43 <dd>Month (1..12)</dd>
44 <dt>bit4:0</dt>
45 <dd>Day (1..31)</dd>
46 </dl>
47 </dd>
48 <dt>ftime</dt>
49 <dd>Indicates the time when the file was modified or the directory was created.<br>
50 <dl>
51 <dt>bit15:11</dt>
52 <dd>Hour (0..23)</dd>
53 <dt>bit10:5</dt>
54 <dd>Minute (0..59)</dd>
55 <dt>bit4:0</dt>
56 <dd>Second / 2 (0..29)</dd>
57 </dl>
58 </dd>
59 <dt>fattrib</dt>
60 <dd>Indicates the attribute flags in combination of:<br>
61 <table class="lst">
62 <tr><th>Flag</th><th>Meaning</th></tr>
63 <tr><td>AM_RDO</td><td>Read-only. Write mode open and deleting is rejected.</td></tr>
64 <tr><td>AM_HID</td><td>Hidden. Should not be shown in normal directory listing.</td></tr>
65 <tr><td>AM_SYS</td><td>System. Used by system and should not be accessed.</td></tr>
66 <tr><td>AM_ARC</td><td>Archive. Set on new creation or any modification to the file.</td></tr>
67 <tr><td>AM_DIR</td><td>Directory. This is not a file but a sub-directory container.</td></tr>
68 </table>
69 </dd>
70 <dt>fname[]</dt>
71 <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. The size of <tt>fname[]</tt> and <tt>altname[]</tt> each can be configured at LFN configuration.</dd>
72 <dt>altname[]</dt>
73 <dd>Alternative object name is stored if available. This member is not available at non-LFN configuration.</dd>
74 </dl>
75
76 <p class="foot"><a href="../00index_e.html">Return</a></p>
77 </body>
78 </html>