nn::fs::CommitSaveData Function

Syntax

Result CommitSaveData(
     const char * archiveName = "data:"
);

Arguments

Name Description
in archiveName Specifies the name of the archive. (If this argument is omitted, "data:" is specified.)

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

Commits a change to the save data.

Commits the save data region that was mounted using the specified archive name, and thereby finalizes the data that has been written to it. If the archive is unmounted without calling this function, or the program stops, all changes to the save data since the previous commit are rolled back.

If this function returns successfully, it is guaranteed that changes to the save data were made correctly. If the program is interrupted while this function is running, there are only two possibilities: either the save data will have been rolled back to the previous commit, or all changes will have been applied. There is no chance of corruption or the data being only partially written.

Revision History

2010/12/14
Added return values.
2010/08/16
Initial version.

CONFIDENTIAL