nn::fs::CreateExtSaveData FunctionResult CreateExtSaveData( nn::fs::ExtSaveDataId id, const void * iconData, size_t iconDataSize, u32 entryDirectory, u32 entryFile );
| Name | Description | |
|---|---|---|
| in | id | Specifies the ID of the expanded save data. |
| in | iconData | Specifies icon data. |
| in | iconDataSize | Specifies the size of the icon data. |
| in | entryDirectory | Specifies the number of directories to be stored in this expanded save data region. |
| in | entryFile | Specifies the number of files to be stored in this expanded save data region. |
| Value | Description |
|---|---|
| Success. | Process was successful. The return value's IsSuccess function returns true in this state. |
ResultMediaNotFound |
SD Card cannot be found or recognized. |
ResultNotEnoughSpace |
The SD Card does not have the necessary free space. |
ResultArchiveInvalidated |
The SD Card may have been removed while data was being created. |
ResultWriteProtected |
The SD Card is write-protected. |
ResultMediaAccessError |
An error occurred while accessing the SD Card due to some cause such as a loose connection. |
ResultNotFormatted |
The process of creating data was interrupted by an error. The same error is returned when a mount operation is attempted from this state. |
ResultBadFormat |
The SD Card has an invalid format. You must format the SD Card. |
| A value other than the above. | An application bug or some other unexpected error. |
Creates an expanded save data memory region.
Creates an expanded save data region corresponding to the ID. Use the expanded save data number speficied in the RSF file to specify the expanded save data ID as an argument.
Before calling this function, you must call MountExtSaveData to determine whether a memory region with the same ID has already been created. To format a region, first delete it with the DeleteExtSaveData function and then call this function.
For the icon data, specify the icn file output by the ctr_makebanner32 tool.
Unless you re-create expanded save data, writes cannot exceed the specified number of directories, number of files, or data size. Be very careful during extended use.
You cannot change the size of files created in expanded save data memory. Consequently, you cannot create files using functions such as FileStream::TryInitialize. Use the TryCreateFile function, which allows you to specify a file size, when creating a file.
ResultMediaAccessError.