SAVEFlushQuota / SAVEFlushQuotaAsync


#include <nn/save.h>

FSStatus            SAVEFlushQuota(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        FSRetFlag               errHandling
FSStatus            SAVEFlushQuotaAsync(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        FSRetFlag               errHandling,
                        const FSAsyncParams     *asyncParams


client Pointer to the client buffer.
block Command block.
accountSlotNo The user account slot number.
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.
The specified user account does not exist on this Wii U console.
FS_STATUS_UNSUPPORTED_CMD The associated file system does not support this function.
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 user account was not found on this console.
FS_STATUS_FATAL_ERROR The argument is invalid.


The file system for the storage where the save data is created supports the journaling feature. All operations by the FS and SAVE APIs are temporarily recorded to journaling blocks by the journaling feature. Calling this function atomically commits all of the operations in the quota.

SAVEFlushQuota flushes the quota for the save directory used by the specified user account. Updated files and directories in the quota are committed atomically.

Each save directory is created as a quota. A quota is a type of directory that has an upper limit on data size. Flushing is performed per quota. If a save directory is flushed by SAVEFlushQuota, the other save directories are not flushed. There is no way to atomically flush multiple save directories.

If an application exits without flushing save directories, uncommitted changes in the save directories are lost. Applications can intentionally discard uncommitted changes by calling SAVERollbackQuota.

Both the sync and 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.

PCFS, a host PC file system, does not support the journaling feature. If you try to flush a save directory on PCFS with this function, a FS_STATUS_UNSUPPORTED_CMD error is returned.

By calling this API, a time stamp for the save directory should be recorded. For more information, see SAVE Library Basic Specifications (Only for SDK 2.10 and later).

The relativePath argument was deprecated because this function flushes save directories regardless of relativePath argument.

Do Not Call From





Revision History

2014/10/22 Revised the return values.
2013/08/06 Added information on time stamps for the save directory.
2013/05/08 Automated cleanup pass.
2012/10/01 Revised the return values.
2012/06/08 Deprecated the relativePath argument.
2012/03/29 Initial version.