nn::fs::FormatSaveData FunctionResult FormatSaveData( size_t maxFiles, size_t maxDirectories, bool isDuplicateAll = false );
| Name | Description | |
|---|---|---|
| in | maxFiles | Specifies the maximum number of files. |
| in | maxDirectories | Specifies the maximum number of directories. |
| in | isDuplicateAll | Specifies whether to duplicate the entire save data region. |
| Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNotEnoughSpace |
The values of maxFiles and maxDirectories are too large for save data. You must not allow this error to occur in retail products. |
| A value other than the above. | An unexpected or fatal error occurred. |
Formats a save data region.
Formats an application-specific save data region. Calling this function will erase any save data that may have existed there.
When you format this save data region, you can specify the maximum number of files and directories that it can hold. Note that you cannot create any more than this number of files and directories.
When formatting with isDuplicateAll set to true, be sure to call the CommitSaveData function before unmounting the save data.
nn::fs::MountSaveData function will return success, but operations on the mounted archive are not guaranteed.
RSF file differs from the actual size of the backup memory, then the backup memory size takes precedence. Even when 128 KB is specified for SaveDataSize, if 512 KB of backup memory is being used, then it formats with a size of 512 KB. Formatting is still possible even if 0 KB is specified.BackupMemoryType.CONFIDENTIAL