fatfs v0.08 May 15, 2010:

- Added a memory configuration option. (_USE_LFN)
- Added file lock feature. (_FS_SHARE)
- Added fast seek feature. (_USE_FASTSEEK)
- Changed some types on the API, XCHAR->TCHAR.
- Changed fname member in the FILINFO structure on Unicode cfg.
- String functions support UTF-8 encoding files on Unicode cfg.
This commit is contained in:
savelij13 committed 2025-09-11 09:40:03 +03:00
1 parent e6cd91ca0b
commit 46155916b1
92 files changed
+2469 -1589

No files matched your search

+21 -14
View File
@@ -4,6 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/sfile.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - FIL</title>
</head>
@@ -12,25 +13,31 @@
<div class="para">
<h2>FIL</h2>
<p>The FIL structure (file object) holds state of an open file. It is initialzed by f_open function and discarded by f_close function. There is no member that can be changed by the application program.</p>
<p>The FIL structure (file object) holds state of an open file. It is created by f_open function and discarded by f_close function. There is no member that can be changed by the application program except for <tt>cltbl</tt>. Note that a sector buffer is defined in this structure under non-tiny configuration so that the FIL structures should not be defined as auto variable.</p>
<pre>
typedef struct _FIL_ {
FATFS* fs; /* Pointer to the owner file system object */
WORD id; /* Owner file system mount ID */
BYTE flag; /* File status flags */
BYTE csect; /* Sector address in the cluster */
DWORD fptr; /* File R/W pointer */
DWORD fsize; /* File size */
DWORD org_clust; /* File start cluster */
DWORD curr_clust; /* Current cluster */
DWORD dsect; /* Current data sector */
typedef struct {
FATFS* fs; <span>/* Pointer to the owner file system object */</span>
WORD id; <span>/* Owner file system mount ID */</span>
BYTE flag; <span>/* File status flags */</span>
BYTE pad1;
DWORD fptr; <span>/* File read/write pointer (Byte offset origin from top of the file) */</span>
DWORD fsize; <span>/* File size */</span>
DWORD org_clust; <span>/* File start cluster */</span>
DWORD curr_clust; <span>/* Current cluster */</span>
DWORD dsect; <span>/* Current data sector */</span>
#if !_FS_READONLY
DWORD dir_sect; /* Sector containing the directory entry */
BYTE* dir_ptr; /* Ponter to the directory entry in the window */
DWORD dir_sect; <span>/* Sector containing the directory entry */</span>
BYTE* dir_ptr; <span>/* Ponter to the directory entry in the window */</span>
#endif
#if _USE_FASTSEEK
DWORD* cltbl; <span>/* Pointer to the cluster link map table */</span>
#endif
#if _FS_SHARE
UINT lockid; <span>/* File lock ID */</span>
#endif
#if !_FS_TINY
BYTE buf[_MAX_SS];/* File R/W buffer */
BYTE buf[_MAX_SS]; <span>/* Data read/write buffer */</span>
#endif
} FIL;
</pre>