fatfs v0.09b Jan 23,2013:
- Added f_getlabel() and f_setlabel(). (_USE_LABEL == 1)
This commit is contained in:
1 parent
030f12c942
commit
750225eb33
112 files changed
+1847
-1043
No files matched your search
+11
-10
@@ -16,9 +16,9 @@
|
||||
<p>The f_open function creates a <em>file object</em> to be used to access the file.</p>
|
||||
<pre>
|
||||
FRESULT f_open (
|
||||
FIL* <em>FileObject</em>, <span class="c">/* Pointer to the blank file object structure */</span>
|
||||
const TCHAR* <em>FileName</em>, <span class="c">/* Pointer to the file neme */</span>
|
||||
BYTE <em>ModeFlags</em> <span class="c">/* Mode flags */</span>
|
||||
FIL* <span class="arg">fp</span>, <span class="c">/* [OUT] File object structure */</span>
|
||||
const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] File name */</span>
|
||||
BYTE <span class="arg">mode</span> <span class="c">/* [IN] Mode flags */</span>
|
||||
);
|
||||
</pre>
|
||||
</div>
|
||||
@@ -26,11 +26,11 @@ FRESULT f_open (
|
||||
<div class="para arg">
|
||||
<h4>Parameters</h4>
|
||||
<dl class="par">
|
||||
<dt>FileObject</dt>
|
||||
<dt>fp</dt>
|
||||
<dd>Pointer to the file object structure to be created.</dd>
|
||||
<dt>FileName</dt>
|
||||
<dt>path</dt>
|
||||
<dd>Pointer to a null-terminated string that specifies the <a href="filename.html">file name</a> to create or open.</dd>
|
||||
<dt>ModeFlags</dt>
|
||||
<dt>mode</dt>
|
||||
<dd>Specifies the type of access and open method for the file. It is specified by a combination of following flags.<br>
|
||||
<table class="lst">
|
||||
<tr><th>Value</th><th>Description</th></tr>
|
||||
@@ -38,7 +38,7 @@ FRESULT f_open (
|
||||
<tr><td>FA_WRITE</td><td>Specifies write access to the object. Data can be written to the file. Combine with <tt>FA_READ</tt> for read-write access.</td></tr>
|
||||
<tr><td>FA_OPEN_EXISTING</td><td>Opens the file. The function fails if the file is not existing. (Default)</td></tr>
|
||||
<tr><td>FA_OPEN_ALWAYS</td><td>Opens the file if it is existing. If not, a new file is created.<br>
|
||||
To append data to the file, use <a href="lseek.html">f_lseek</a> function after file open in this method.</td></tr>
|
||||
To append data to the file, use <a href="lseek.html"><tt>f_lseek()</tt></a> function after file open in this method.</td></tr>
|
||||
<tr><td>FA_CREATE_NEW</td><td>Creates a new file. The function fails with <tt>FR_EXIST</tt> if the file is existing.</td></tr>
|
||||
<tr><td>FA_CREATE_ALWAYS</td><td>Creates a new file. If the file is existing, it is truncated and overwritten.</td></tr>
|
||||
</table>
|
||||
@@ -59,6 +59,7 @@ To append data to the file, use <a href="lseek.html">f_lseek</a> function after
|
||||
<a href="rc.html#in">FR_INVALID_NAME</a>,
|
||||
<a href="rc.html#de">FR_DENIED</a>,
|
||||
<a href="rc.html#ex">FR_EXIST</a>,
|
||||
<a href="rc.html#io">FR_INVALID_OBJECT</a>,
|
||||
<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,
|
||||
<a href="rc.html#id">FR_INVALID_DRIVE</a>,
|
||||
<a href="rc.html#ne">FR_NOT_ENABLED</a>,
|
||||
@@ -73,9 +74,9 @@ To append data to the file, use <a href="lseek.html">f_lseek</a> function after
|
||||
|
||||
<div class="para desc">
|
||||
<h4>Description</h4>
|
||||
<p>After f_open function succeeded, the file object is valid. The file object is used for subsequent read/write functions to identify the file. When close an open file object, use <a href="close.html">f_close</a> function. If the modified file is not closed, the file data can be collapsed.</p>
|
||||
<p>If duplicated file open is needed, read <a href="appnote.html#dup">here</a> carefully. However duplicated open of a file with write mode flags is always prohibited.</p>
|
||||
<p>Before using any file function, a work area (file system object) must be registered to the logical drive with <a href="mount.html">f_mount</a> function. All API functions except for <a href="fdisk.html">f_fdisk</a> function can work after this procedure.</p>
|
||||
<p>After <tt>f_open()</tt> function succeeded, the file object is valid. The file object is used for subsequent read/write functions to identify the file. To close an open file, use <a href="close.html"><tt>f_close()</tt></a> function. If the file is modified and not closed properly, the file data will be collapted.</p>
|
||||
<p>If duplicated file open is needed, read <a href="appnote.html#dup">here</a> carefully. However duplicated open of a file with write mode flag is always prohibited.</p>
|
||||
<p>Before using any file function, a work area (file system object) must be registered to the logical drive with <a href="mount.html"><tt>f_mount()</tt></a> function. All API functions except for <a href="fdisk.html"><tt>f_fdisk()</tt></a> function can work after this procedure.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user