nn::fs::GetArchiveFreeBytes Function

Syntax

Result GetArchiveFreeBytes(
     s64 * pOut,
     const char * archiveName
);

Arguments

Name Description
out pOut Returns the amount of free archive space.
in archiveName Specifies the archive name.

Return Values

Returns the result of the operation.
Value Description
Success. Process was successful. The return value's IsSuccess function returns true in this state.
ResultNotFound The specified archive has not been mounted. You must not allow this error to occur in retail products.
A value other than the above. An application bug or some other unexpected error.

Description

Gets the amount of free space in the archive.

This function can only be used on save data archives.

The save data region manages data with a fixed size of 512 bytes. As a result, this function's return value is always a multiple of 512 bytes. When this function returns 1024, that means you can create two files of 512 bytes. If you create one file of 513 bytes, the remaining available space goes to 0.

Revision History

2010/12/15
Added return values.
2010/11/13
Added descriptions of the block size. Changed the type of the archiveName argument from wchar_t* to const char*.
2010/11/09
Initial version.

CONFIDENTIAL