- Removed a long-pending limitation that f_getcwd and double-dot .. in the path name did not work on the exFAT volume. - Fixed f_readdir cannot detect end of directory and it leads the application process into infinite loop. (appeared at R0.15b) - Fixed dot names with terminating separator or duplicated separator are rejected when LFN is not enabled.
		
			
				
	
	
		
			88 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 | |
| <html lang="en">
 | |
| <head>
 | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | |
| <meta http-equiv="Content-Style-Type" content="text/css">
 | |
| <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
 | |
| <title>FatFs - FILINFO</title>
 | |
| </head>
 | |
| 
 | |
| <body>
 | |
| 
 | |
| <div class="para">
 | |
| <h2>FILINFO</h2>
 | |
| <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>
 | |
| <pre>
 | |
| <span class="k">typedef struct</span> {
 | |
|     FSIZE_t fsize;               <span class="c">/* File size (invalid for directory) */</span>
 | |
|     WORD    fdate;               <span class="c">/* Date of file modification or directory creation */</span>
 | |
|     WORD    ftime;               <span class="c">/* Time of file modification or directory creation */</span>
 | |
| <span class="k">#if</span> FF_FS_CRTIME
 | |
|     WORD    crdate;              <span class="c">/* Date of object createion */</span>
 | |
|     WORD    crtime;              <span class="c">/* Time of object createion */</span>
 | |
| <span class="k">#endif</span>
 | |
|     BYTE    fattrib;             <span class="c">/* Object attribute */</span>
 | |
| <span class="k">#if</span> FF_USE_LFN
 | |
|     TCHAR   altname[FF_SFN_BUF + 1]; <span class="c">/* Alternative object name */</span>
 | |
|     TCHAR   fname[FF_LFN_BUF + 1];   <span class="c">/* Primary object name */</span>
 | |
| <span class="k">#else</span>
 | |
|     TCHAR   fname[12 + 1];       <span class="c">/* Object name */</span>
 | |
| <span class="k">#endif</span>
 | |
| } FILINFO;
 | |
| </pre>
 | |
| </div>
 | |
| 
 | |
| <h4>Members</h4>
 | |
| <dl>
 | |
| <dt>fsize</dt>
 | |
| <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>
 | |
| <dt>fdate</dt>
 | |
| <dd>The date when the file was modified or the directory was created.<br>
 | |
| <dl>
 | |
| <dt>bit15:9</dt>
 | |
| <dd>Year origin from 1980 (0..127)</dd>
 | |
| <dt>bit8:5</dt>
 | |
| <dd>Month (1..12)</dd>
 | |
| <dt>bit4:0</dt>
 | |
| <dd>Day (1..31)</dd>
 | |
| </dl>
 | |
| </dd>
 | |
| <dt>ftime</dt>
 | |
| <dd>The time when the file was modified or the directory was created.<br>
 | |
| <dl>
 | |
| <dt>bit15:11</dt>
 | |
| <dd>Hour (0..23)</dd>
 | |
| <dt>bit10:5</dt>
 | |
| <dd>Minute (0..59)</dd>
 | |
| <dt>bit4:0</dt>
 | |
| <dd>Second / 2 (0..29)</dd>
 | |
| </dl>
 | |
| </dd>
 | |
| <dt>crdate</dt>
 | |
| <dd>The date when the file/directory was created. This member is available when <tt><a href="config.html#fs_ctime">FF_FS_CRTIME</a> = 1</tt>.
 | |
| </dd>
 | |
| <dt>crtime</dt>
 | |
| <dd>The time when the file/directory was created. This member is available when <tt>FF_FS_CRTIME = 1</tt>
 | |
| </dd>
 | |
| <dt>fattrib</dt>
 | |
| <dd>The attribute flags in combination of:<br>
 | |
| <table class="lst">
 | |
| <tr><th>Flag</th><th>Meaning</th></tr>
 | |
| <tr><td>AM_RDO</td><td>Read-only. Write mode open and deleting is rejected.</td></tr>
 | |
| <tr><td>AM_HID</td><td>Hidden. Should not be shown in normal directory listing.</td></tr>
 | |
| <tr><td>AM_SYS</td><td>System. Used by system and should not be accessed.</td></tr>
 | |
| <tr><td>AM_ARC</td><td>Archive. Set on new creation or any modification to the file.</td></tr>
 | |
| <tr><td>AM_DIR</td><td>Directory. This is not a file but a sub-directory container.</td></tr>
 | |
| </table>
 | |
| </dd>
 | |
| <dt>fname[]</dt>
 | |
| <dd>Null-terminated object name is stored. If no item to read or an error occured in the function, a null string is stored to indicate this structure is invalid. The size of <tt>fname[]</tt> and <tt>altname[]</tt> each can be configured in LFN configuration.</dd>
 | |
| <dt>altname[]</dt>
 | |
| <dd>Alternative object name is stored if available. This member is not available in non-LFN configuration.</dd>
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| <p class="foot"><a href="../index.html">Return</a></p>
 | |
| </body>
 | |
| </html>
 |