SAVEGetFreeSpaceSize / SAVEGetFreeSpaceSizeAsync

Syntax

#include <nn/save.h>

FSStatus            SAVEGetFreeSpaceSize(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        FSFreeSpaceSize         *returnedFreeSize,
                        FSRetFlag               errHandling
                        );
FSStatus            SAVEGetFreeSpaceSizeAsync(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u8                      accountSlotNo,
                        FSFreeSpaceSize         *returnedFreeSize,
                        FSRetFlag               errHandling,
                        const FSAsyncParams     *asyncParams
                        );

Parameters

client Pointer to the client buffer.
block Command block.
accountSlotNo The user account slot number.
returnedFreeSize Pointer to the free space 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_PERMISSION_ERROR The caller does not have the correct access permission.
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_FATAL_ERROR The argument is invalid.

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

Gets the size of the free space of the save directory used by the specified user account. Each save directory is one quota, which has an upper limit on its data size. Quota sizes are specified in meta.xml. When a new file or directory is created, the file system metadata is also allocated from the free space size. The amount of free space may not match the size of the user data that can actually be used, because of fragmentation and temporary data for journaling.

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.

The volume information obtained is stored to returnedFreeSize when the process is completed.

NOTE:
The relativePath argument was deprecated because this function returns the free space of save directories regardless of the relativePath argument.

Do Not Call From

SAVEGetFreeSpaceSize

None.

SAVEGetFreeSpaceSizeAsync

None.

See Also

File/Directory operations
SAVEGetStat

Revision History

2014/10/22 Revised the return values.
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.


CONFIDENTIAL