SAVEOpenDirOtherNormalApplicationVariation / SAVEOpenDirOtherNormalApplicationVariationAsync

Syntax

#include <nn/save.h>

FSStatus            SAVEOpenDirOtherNormalApplicationVariation(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u32                     uniqueId,
                        u8                      variation,
                        u8                      accountSlotNo,
                        const char              *path,
                        FSDirHandle             *dirHandle,
                        FSRetFlag               errHandling
                        );
FSStatus            SAVEOpenDirOtherNormalApplicationVariationAsync(
                        FSClient                *client,
                        FSCmdBlock              *block,
                        u32                     uniqueId,
                        u8                      variation,
                        u8                      accountSlotNo,
                        const char              *path,
                        FSDirHandle             *dirHandle,
                        FSRetFlag               errHandling,
                        const FSAsyncParams     *asyncParams
                        );

Parameters

client Pointer to the client buffer.
block Command block.
uniqueId The unique ID of the target.
variation The variation of the target.
accountSlotNo The user account slot number.
path Directory path. The relative path for the save directory for the specified user account. The length must be less than SAVE_MAX_ARGPATH_SIZE.
dirHandle Pointer to the handle of the directory stream associated with the directory to open.
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_MAX System has too many directory points to create more.
FS_STATUS_NOT_FOUND Target not found.
or
The specified user account does not exist on this Wii U console.
FS_STATUS_NOT_DIR Specified path is not a directory.
FS_STATUS_PERMISSION_ERROR The caller does not have 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.

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

Opens the application save subdirectory specified in uniqueId, variation and path, and creates the directory stream associated with that directory. The position of the directory stream is set to the head.

The generated directory handle is stored in dirHandle when the process is completed.

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.

If you plan to run an application that uses these functions in an environment with a USB drive connected, the USB drive must be connected when you start the application and create the save data. If you plan to run the application in an environment without a USB drive connected, the USB drive must be disconnected when you start the application and create the save data.

If you prepare save data using the Save Data Manager menu item in the System Config Tool, note that this function can only access save data that exists in NAND and USB storage, not on the host PC. Also note that to access save data in NAND, the application that uses these functions needs to be launched using either cafediscrun or caferun in an environment that is not connected to a USB drive.

Do Not Call From

SAVEOpenDirOtherNormalApplicationVariation

None.

SAVEOpenDirOtherNormalApplicationVariationAsync

None.

See Also

File/Directory operations
FSReadDir
FSRewindDir
FSCloseDir

Revision History

2014/10/22 Revised the return values.
2014/06/04 Initial version.


CONFIDENTIAL