]> cloudbase.mooo.com Git - z180-stamp.git/blame - fatfs/documents/doc/sfileinfo.html
Import fatfs R0.13b
[z180-stamp.git] / fatfs / documents / doc / sfileinfo.html
CommitLineData
53668523
L
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
2<html lang="en">\r
3<head>\r
289f6a14 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
53668523
L
5<meta http-equiv="Content-Style-Type" content="text/css">\r
6<link rel="up" title="FatFs" href="../00index_e.html">\r
7<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sfileinfo.html">\r
8<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
9<title>FatFs - FILINFO</title>\r
10</head>\r
11\r
12<body>\r
13\r
14<div class="para">\r
15<h2>FILINFO</h2>\r
289f6a14 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>\r
53668523
L
17<pre>\r
18<span class="k">typedef struct</span> {\r
70702af1
L
19 FSIZE_t fsize; <span class="c">/* File size */</span>\r
20 WORD fdate; <span class="c">/* Last modified date */</span>\r
21 WORD ftime; <span class="c">/* Last modified time */</span>\r
22 BYTE fattrib; <span class="c">/* Attribute */</span>\r
289f6a14
L
23<span class="k">#if</span> FF_USE_LFN\r
24 TCHAR altname[FF_SFN_BUF + 1]; <span class="c">/* Alternative object name */</span>\r
25 TCHAR fname[FF_LFN_BUF + 1]; <span class="c">/* Primary object name */</span>\r
70702af1 26<span class="k">#else</span>\r
289f6a14 27 TCHAR fname[12 + 1]; <span class="c">/* Object name */</span>\r
53668523
L
28<span class="k">#endif</span>\r
29} FILINFO;\r
30</pre>\r
31</div>\r
32\r
33<h4>Members</h4>\r
34<dl>\r
35<dt>fsize</dt>\r
289f6a14 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>\r
53668523 37<dt>fdate</dt>\r
70702af1 38<dd>Indicates the date when the file was modified or the directory was created.<br>\r
53668523
L
39<dl>\r
40<dt>bit15:9</dt>\r
41<dd>Year origin from 1980 (0..127)</dd>\r
42<dt>bit8:5</dt>\r
43<dd>Month (1..12)</dd>\r
44<dt>bit4:0</dt>\r
45<dd>Day (1..31)</dd>\r
46</dl>\r
47</dd>\r
48<dt>ftime</dt>\r
70702af1 49<dd>Indicates the time when the file was modified or the directory was created.<br>\r
53668523
L
50<dl>\r
51<dt>bit15:11</dt>\r
52<dd>Hour (0..23)</dd>\r
53<dt>bit10:5</dt>\r
54<dd>Minute (0..59)</dd>\r
55<dt>bit4:0</dt>\r
56<dd>Second / 2 (0..29)</dd>\r
57</dl>\r
58</dd>\r
59<dt>fattrib</dt>\r
289f6a14
L
60<dd>Indicates the attribute flags in combination of:<br>\r
61<table class="lst">\r
62<tr><th>Flag</th><th>Meaning</th></tr>\r
63<tr><td>AM_RDO</td><td>Read-only. Write mode open and deleting is rejected.</td></tr>\r
64<tr><td>AM_HID</td><td>Hidden. Should not be shown in normal directory listing.</td></tr>\r
65<tr><td>AM_SYS</td><td>System. Used by system and should not be accessed.</td></tr>\r
66<tr><td>AM_ARC</td><td>Archive. Set on new creation or any modification to the file.</td></tr>\r
67<tr><td>AM_DIR</td><td>Directory. This is not a file but a sub-directory container.</td></tr>\r
68</table>\r
69</dd>\r
53668523 70<dt>fname[]</dt>\r
289f6a14 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>\r
70702af1
L
72<dt>altname[]</dt>\r
73<dd>Alternative object name is stored if available. This member is not available at non-LFN configuration.</dd>\r
53668523
L
74</dl>\r
75\r
76<p class="foot"><a href="../00index_e.html">Return</a></p>\r
77</body>\r
78</html>\r