SAVERename / SAVERenameAsync

Syntax

#include <nn/save.h>

FSStatus            SAVERename(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        const char              *oldPath,
                        const char              *newPath,
                        FSRetFlag               errHandling
                        );
FSStatus            SAVERenameAsync(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        const char              *oldPath,
                        const char              *newPath,
                        FSRetFlag               errHandling,
                        const FSAsyncParams     *asyncParams
                        );

Parameters

client Pointer to the client buffer.
block Command block.
accountSlotNo The user account slot number.
oldPath File or directory path to rename. The relative path for the save directory for the specified user account. The length must be less than FS_MAX_ARGPATH_SIZE.
newPath New file or directory path. The relative path for the save directory for the specified user account. The length must be less than FS_MAX_ARGPATH_SIZE.
errHandling Automatic error handling flag. Only the indicated error is returned.
asyncParams (Async API only) Notification parameters for an asynchronous call.

Return Values

Synchronous API: Return Value; Asynchronous API: Callback Return Value

FS_STATUS_OK Successfully completed.
FS_STATUS_CANCELED The command was canceled.
FS_STATUS_NOT_FOUND Target not found.
or
The specified user account does not exist on this Wii U console.
FS_STATUS_NOT_DIR Specified path includes a file entry as directory.
FS_STATUS_PERMISSION_ERROR The caller does not have correct access permission.
FS_STATUS_EXISTS New name already exists but has a different inode type.
FS_STATUS_ALREADY_OPEN There is one or more open file or directory in source path or destination path.
FS_STATUS_UNSUPPORTED_CMD Associated file system does not support this function.
FS_STATUS_STORAGE_FULL Data space cannot be allocated to update directory tree.
FS_STATUS_JOURNAL_FULL Journaling space is full and new journaling block cannot be allocated.
FS_STATUS_MEDIA_NOT_READY (Only for manually mounted devices) Media is not present.
FS_STATUS_MEDIA_ERROR (Only for manually mounted devices) Media is in some inaccessible condition.
FS_STATUS_DATA_CORRUPTED (Only for manually mounted devices) The data is corrupted beyond repair. The volume needs format.
FS_STATUS_WRITE_PROTECTED (Only for manually mounted devices) Media is write protected.

Async API: Immediate Return Values

FS_STATUS_OK Successfully issued the request.
FS_STATUS_NOT_FOUND The specified user account does not exist on this Wii U console.
FS_STATUS_FATAL_ERROR The argument is invalid.

Description

Renames save data files or save subdirectory entries specified in oldPath to newPath. It only changes the metadata in the file system without moving the data itself. oldPath and newPath must be on the same mount point.

Both the sync and the async style API functions are provided. To use the async API functions, set the user callback and parameters in asyncParams. For more information, see FSAsyncParams.

Do Not Call From

SAVERename

None.

SAVERenameAsync

None.

See Also

File/Directory operations
SAVEMakeDir
SAVERemove

Revision History

2013/05/08 Automated cleanup pass.
2012/10/01 Revised the return values.
2012/07/30 Deleted information about FSA.
2012/06/14 Fixed capitalization.
2012/03/29 Initial version.


CONFIDENTIAL