#include <cafe/fs.h> FSStatus FSRename( FSClient *client, FSCmdBlock *block, const char *oldpath, const char *newpath, FSRetFlag errHandling ); FSStatus FSRenameAsync( FSClient *client, FSCmdBlock *block, const char *oldpath, const char *newpath, FSRetFlag errHandling, const FSAsyncParams *asyncParams );
|client||Pointer to the client buffer.|
|oldpath||The file or directory path to be renamed. Length must be less than
|newpath||New file or directory path. Length must be less than
|errHandling||Auto error handling flag. Only indicated errors are returned.|
|asyncParams||(Async API only) Notification parameters for an asynchronous call.|
||The command was canceled.|
||Target not found.|
||Specified path includes a file entry as directory.|
||The caller does not have correct access permission.|
||New name already exists but has a different inode type.|
||There is one or more open file or directory in source path or destination path.|
||Associated file system does not support this function.|
||Data space cannot be allocated to update directory tree.|
||Journaling space is full and new journaling block cannot be allocated.|
||(Only for manually mounted devices) Media is not present.|
||(Only for manually mounted devices) Media is in some inaccessible condition.|
||(Only for manually mounted devices) The data is corrupted beyond repair. The volume needs format.|
||(Only for manually mounted devices) Media is write protected.|
||Successfully issued request.|
||The argument is invalid.|
Renames the file or directory entry designated by oldpath to newpath. It only lets filesystem changes its metadata without transferring data itself. oldpath and newpath must be on the same mount point.
Both a sync and async style API are provided. To use the async API, set the user callback and parameters in asyncParams.
For more information, see
|Thread that displays graphics||Do not call this function from a thread that displays graphics. This function may block indefinitely in error cases and the application must be able to display appropriate messages.|
|Thread that handles system messages||Do not call this function from a thread that handles system messages. This function may block indefinitely in error cases and the application must be able to handle system events such as shutdown.|
|Callbacks||Do not call this function from any callback function.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
2014/09/16 Added "Thread that displays graphics" and "Thread that handles system messages" to "Do not call from".
2013/06/06 Added FS_STATUS_NOT_DIR to return values.
2013/06/05 Corrected the return value FS_STATUS_ALREADY_EXISTS -> FS_STATUS_EXISTS.
2013/05/23 Added FS_STATUS_DATA_CORRUPTED to return values.
2013/05/20 Added FS_STATUS_MEDIA_NOT_READY and FS_STATUS_WRITE_PROTECTED to return values.
2013/05/08 Automated cleanup pass.
2013/01/10 Added "Callback" to "Do not call from".
2012/07/30 Removed information about FSA.
2012/07/20 Readability and correctness cleanup.
2012/02/27 Initial version.