fatfs v0.07e Nov 03,2009:
- Separated out configuration options from ff.h to ffconf.h. - Added a configuration option, _LFN_UNICODE. - Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH. - Fixed name matching error on the 13 char boundary. - Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
This commit is contained in:
1 parent
25f499b847
commit
e6cd91ca0b
76 files changed
+918
-636
No files matched your search
+16
-10
@@ -12,11 +12,11 @@
|
||||
|
||||
<div class="para">
|
||||
<h2>f_rename</h2>
|
||||
<p>Rename file or directory.</p>
|
||||
<p>Renames an object.</p>
|
||||
<pre>
|
||||
FRESULT f_rename (
|
||||
const XCHAR* <em>OldName</em>, /* Pointer to old file/directory name */
|
||||
const XCHAR* <em>NewName</em> /* Pointer to new file/directory name */
|
||||
const XCHAR* <em>OldName</em>, /* Pointer to old object name */
|
||||
const XCHAR* <em>NewName</em> /* Pointer to new object name */
|
||||
);
|
||||
</pre>
|
||||
</div>
|
||||
@@ -25,9 +25,9 @@ FRESULT f_rename (
|
||||
<h4>Parameters</h4>
|
||||
<dl class="par">
|
||||
<dt>OldName</dt>
|
||||
<dd>Pointer to a null-terminated string specifies the old <a href="filename.html">file/directory name</a> to be renamed.</dd>
|
||||
<dd>Pointer to a null-terminated string specifies the old <a href="filename.html">object name</a> to be renamed.</dd>
|
||||
<dt>NewName</dt>
|
||||
<dd>Pointer to a null-terminated string specifies the new file/directory name without drive number. Existing object nannot be specified.</dd>
|
||||
<dd>Pointer to a null-terminated string specifies the new object name without drive number.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@ FRESULT f_rename (
|
||||
<dt>FR_NOT_READY</dt>
|
||||
<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
|
||||
<dt>FR_EXIST</dt>
|
||||
<dd>There is an object that have a name equal to new name.</dd>
|
||||
<dd>The new name is colliding with an existing name.</dd>
|
||||
<dt>FR_DENIED</dt>
|
||||
<dd>The new name could not be created due to any reason.</dd>
|
||||
<dt>FR_WRITE_PROTECTED</dt>
|
||||
@@ -60,24 +60,30 @@ FRESULT f_rename (
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>The logical drive has no work area.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
<dd>There is no valid FAT partition on the disk.</dd>
|
||||
<dd>There is no valid FAT volume on the disk.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="para">
|
||||
<h4>Description</h4>
|
||||
<p>Rename a file or directory and can move it to other directory. Logical drive number is determined by old name, new name must not contain logical drive number. This function is not supported in read-only configuration or minimization level of >= 1.</p>
|
||||
<p>Renames an object and can also move it to other directory. The logical drive number is determined by old name, new name must not contain a logical drive number. <em>Do not rename open objects</em>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="para">
|
||||
<h4>QuickInfo</h4>
|
||||
<p>Available when <tt>_FS_READONLY == 0</tt> and <tt>_FS_MINIMIZE == 0</tt>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="para">
|
||||
<h4>Example</h4>
|
||||
<pre>
|
||||
// Rename a file or directory
|
||||
/* Rename an object */
|
||||
f_rename("oldname.txt", "newname.txt");
|
||||
|
||||
// Rename and move a file or directory to other directory simultaneously
|
||||
/* Rename and move an object to other directory */
|
||||
f_rename("oldname.txt", "dir1/newname.txt");
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user