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