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="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default"> 7<title>FatFs - FILINFO</title> 8</head> 9 10<body> 11 12<div class="para"> 13<h2>FILINFO</h2> 14<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> 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> FF_USE_LFN 22 TCHAR altname[FF_SFN_BUF + 1]; <span class="c">/* Alternative object name */</span> 23 TCHAR fname[FF_LFN_BUF + 1]; <span class="c">/* Primary object name */</span> 24<span class="k">#else</span> 25 TCHAR fname[12 + 1]; <span class="c">/* Object name */</span> 26<span class="k">#endif</span> 27} FILINFO; 28</pre> 29</div> 30 31<h4>Members</h4> 32<dl> 33<dt>fsize</dt> 34<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> 35<dt>fdate</dt> 36<dd>The date when the file was modified or the directory was created.<br> 37<dl> 38<dt>bit15:9</dt> 39<dd>Year origin from 1980 (0..127)</dd> 40<dt>bit8:5</dt> 41<dd>Month (1..12)</dd> 42<dt>bit4:0</dt> 43<dd>Day (1..31)</dd> 44</dl> 45</dd> 46<dt>ftime</dt> 47<dd>The time when the file was modified or the directory was created.<br> 48<dl> 49<dt>bit15:11</dt> 50<dd>Hour (0..23)</dd> 51<dt>bit10:5</dt> 52<dd>Minute (0..59)</dd> 53<dt>bit4:0</dt> 54<dd>Second / 2 (0..29)</dd> 55</dl> 56</dd> 57<dt>fattrib</dt> 58<dd>The attribute flags in combination of:<br> 59<table class="lst"> 60<tr><th>Flag</th><th>Meaning</th></tr> 61<tr><td>AM_RDO</td><td>Read-only. Write mode open and deleting is rejected.</td></tr> 62<tr><td>AM_HID</td><td>Hidden. Should not be shown in normal directory listing.</td></tr> 63<tr><td>AM_SYS</td><td>System. Used by system and should not be accessed.</td></tr> 64<tr><td>AM_ARC</td><td>Archive. Set on new creation or any modification to the file.</td></tr> 65<tr><td>AM_DIR</td><td>Directory. This is not a file but a sub-directory container.</td></tr> 66</table> 67</dd> 68<dt>fname[]</dt> 69<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> 70<dt>altname[]</dt> 71<dd>Alternative object name is stored if available. This member is not available in non-LFN configuration.</dd> 72</dl> 73 74 75<p class="foot"><a href="../00index_e.html">Return</a></p> 76</body> 77</html> 78