NANDSetStatusAsync

C Specification


#include <revolution/nand.h>

typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );

s32 NANDSetStatusAsync( const char *path, const NANDStatus *stat, NANDCallback cb, NANDCommandBlock *block );

Arguments

path Specifies the path of the target file or directory.
stat Pointer to a NANDStatus structure.
cb Callback function to call when this function completes processing.
block Command block structure to be passed to the callback function.

Return Values

Returns NAND_RESULT_OK when the request begins normally.

NAND_RESULT_OK
NAND_RESULT_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_CORRUPT
NAND_RESULT_INVALID
NAND_RESULT_NOEXISTS
NAND_RESULT_NOTEMPTY
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR

Description

Sets the status of the specified file or directory asynchronously. This operation cannot be performed if the file or directory has an owner ID that is different from the owner ID of the application. If this operation is performed on a file, the file size must be zero. Permission can be specified with the permission member variable of the NANDStatus structure. However, at a minimum the file or directory must be granted the NAND_PERM_OWNER_READ permission. If NAND_PERM_OWNER_READ permission is not granted, the function will return NAND_RESULT_INVALID. NAND_RESULT_BUSY is returned and this function call is denied when the queue for accepting requests inside the library is full.

If this function is used on the home directory, the permissions will be initialized by the system when the application restarts. In order to avoid problems caused by the initialization of permissions, do not use this function on the home directory.

See Also

NANDStatus, NANDGetStatus, NANDGetStatusAsync, NANDSetStatus

Revision History

2007/12/10 Added a mention of the fact that the permissions for the home directory will be initialized by the system upon restarting.
2006/11/13 Added explanation about the need to grant NAND_PERM_OWNER_READ permission.
2006/11/13 Deleted the section about restrictions on file size.
2006/06/16 Initial version.


CONFIDENTIAL