X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/5366852335044c1e68a5c32548d3051cc943552f..refs/tags/fatfs-0.12b:/fatfs/doc/en/rename.html diff --git a/fatfs/doc/en/rename.html b/fatfs/doc/en/rename.html index 2593e89..10cb4fd 100644 --- a/fatfs/doc/en/rename.html +++ b/fatfs/doc/en/rename.html @@ -13,7 +13,7 @@
Renames a file or sub-directory.
+The f_rename function renames and/or moves a file or sub-directory.
FRESULT f_rename ( const TCHAR* old_name, /* [IN] Old object name */ @@ -26,9 +26,9 @@ FRESULT f_rename (Parameters
Renames a file or sub-directory and can also move it to other directory within the same logical drive. Do not rename open objects or directry table can be broken.
+Renames a file or sub-directory and can also move it to other directory in the same volume. The object to be renamed must not be an open object, or the FAT volume can be collapsed. Such the wrong operation is rejected safely when file lock function is enabled.
- /* Rename an object */ + /* Rename an object in the default drive */ f_rename("oldname.txt", "newname.txt"); - /* Rename and move an object to other directory */ - f_rename("oldname.txt", "dir1/newname.txt"); + /* Rename an object in the drive 2 */ + f_rename("2:oldname.txt", "newname.txt"); + + /* Rename an object and move it to other directory in the volume */ + f_rename("log.txt", "old/log0001.txt");