mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-23 08:57:31 +00:00
FatFs update to R0.11a.
This commit is contained in:
@@ -26,9 +26,9 @@ FRESULT f_rename (
|
||||
<h4>Parameters</h4>
|
||||
<dl class="par">
|
||||
<dt>old_name</dt>
|
||||
<dd>Pointer to a null-terminated string that specifies an existing <a href="filename.html">file or sub-directory</a> to be renamed.</dd>
|
||||
<dd>Pointer to a null-terminated string that specifies the existing <a href="filename.html">file or sub-directory</a> to be renamed.</dd>
|
||||
<dt>new_name</dt>
|
||||
<dd>Pointer to a null-terminated string that specifies the new object name. The drive number specified in this string is ignored and one determined by <tt class="arg">old_name</tt> is used instead.</dd>
|
||||
<dd>Pointer to a null-terminated string that specifies the new object name. Any drive number may be specified in this string but it is ignored and assumed as the same drive of the <tt class="arg">old_name</tt>.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ FRESULT f_rename (
|
||||
|
||||
<div class="para desc">
|
||||
<h4>Description</h4>
|
||||
<p>Renames a file or sub-directory and can also move it to other directory within the same logical drive. <em>Do not rename open objects</em> or directry table can be broken.</p>
|
||||
<p>Renames a file or sub-directory and can also move it to other directory in the same logical drive. The object to be renamed must not be an open object, or <em>the FAT volume can be collapsed</em>. Such the wrong operation can be rejected safely when <a href="appnote.html#dup">file lock feature</a> is enabled.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -71,11 +71,14 @@ FRESULT f_rename (
|
||||
<div class="para use">
|
||||
<h4>Example</h4>
|
||||
<pre>
|
||||
<span class="c">/* Rename an object */</span>
|
||||
<span class="c">/* Rename an object in the default drive */</span>
|
||||
f_rename("oldname.txt", "newname.txt");
|
||||
|
||||
<span class="c">/* Rename and move an object to other directory */</span>
|
||||
f_rename("oldname.txt", "dir1/newname.txt");
|
||||
<span class="c">/* Rename an object in the drive 2 */</span>
|
||||
f_rename("2:oldname.txt", "newname.txt");
|
||||
|
||||
<span class="c">/* Rename an object and move it to other directory */</span>
|
||||
f_rename("log.txt", "old/log0001.txt");
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user