]> cloudbase.mooo.com Git - z180-stamp.git/blame - fatfs/doc/en/sfile.html
Merge branch 'chan-fatfs' into fatfs-integration
[z180-stamp.git] / fatfs / doc / en / sfile.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
4<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
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/sfile.html">\r
8<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
9<title>FatFs - FIL</title>\r
10</head>\r
11\r
12<body>\r
13\r
14<div class="para">\r
15<h2>FIL</h2>\r
70702af1 16<p>The <tt>FIL</tt> structure (file object) holds the state of an open file. It is created by <tt>f_open</tt> function and discarded by <tt>f_close</tt> function. Application program must not modify any member in this structure except for <tt>cltbl</tt>, or any data on the FAT volume can be collapsed. Note that a sector buffer is defined in this structure at non-tiny configuration (<tt>_FS_TINY == 0</tt>), so that the <tt>FIL</tt> structures at that configuration should not be defined as auto variable.</p>\r
53668523
L
17\r
18<pre>\r
19<span class="k">typedef</span> <span class="k">struct</span> {\r
70702af1 20 _FDID obj; <span class="c">/* Owner file sytem object and object identifier */</span>\r
53668523
L
21 BYTE flag; <span class="c">/* File object status flags */</span>\r
22 BYTE err; <span class="c">/* Abort flag (error code) */</span>\r
70702af1
L
23 FSIZE_t fptr; <span class="c">/* File read/write pointer (Byte offset origin from top of the file) */</span>\r
24 DWORD clust; <span class="c">/* Current cluster of fptr (One cluster behind if fptr is on the cluster boundary. Invalid if fptr == 0.) */</span>\r
25 DWORD sect; <span class="c">/* Current data sector (Can be invalid if fptr is on the cluster boundary.)*/</span>\r
53668523 26<span class="k">#if</span> !_FS_READONLY\r
70702af1 27 DWORD dir_sect; <span class="c">/* Sector number containing the directory entry */</span>\r
53668523
L
28 BYTE* dir_ptr; <span class="c">/* Ponter to the directory entry in the window */</span>\r
29<span class="k">#endif</span>\r
30<span class="k">#if</span> _USE_FASTSEEK\r
70702af1 31 DWORD* cltbl; <span class="c">/* Pointer to the cluster link map table (Nulled on file open. Set by application.) */</span>\r
53668523
L
32<span class="k">#endif</span>\r
33<span class="k">#if</span> !_FS_TINY\r
70702af1 34 BYTE buf[_MAX_SS]; <span class="c">/* File private data transfer buffer (Always valid if fptr is not on the sector boundary but can be invalid if fptr is on the sector boundary.) */</span>\r
53668523
L
35<span class="k">#endif</span>\r
36} FIL;\r
37</pre>\r
38\r
39</div>\r
40\r
41<p class="foot"><a href="../00index_e.html">Return</a></p>\r
42</body>\r
43</html>\r