#include <revolution/nand.h> typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); s32 NANDSimpleSafeCloseAsync(NANDFileInfo *info, NANDCallback cb, NANDCommandBlock *block);
| info | (Pointer to the NANDFileInfo structure (opened by the NANDSimpleSafeOpen[Async] function). |
|---|---|
| cb | Callback function to call when this function completes processing. |
| block | Command block structure to be passed to the callback function. |
The result codes that NANDSimpleSafeCloseAsync can return are listed below. When the request begins normally, returns NAND_RESULT_OK.
NAND_RESULT_OK
NAND_RESULT_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_INVALID
NAND_RESULT_FATAL_ERROR
The result codes that may be passed to the callback function are listed below.
NAND_RESULT_OK
NAND_RESULT_ACCESS
NAND_RESULT_ALLOC_FAILED
NAND_RESULT_BUSY
NAND_RESULT_CORRUPT
NAND_RESULT_INVALID
NAND_RESULT_OPENFD
NAND_RESULT_UNKNOWN
NAND_RESULT_FATAL_ERROR
Note: It is possible that this function may return NAND_RESULT_OPENFD due to internal operations. However, NAND_RESULT_OPENFD will not be returned if the application does not perform an illegal operation, such as directly access files under the /tmp/sys directory used by NANDSimpleSafe-related functions.
Asynchronously closes a file in a manner that guarantees the atomic nature of the file updates. Files closed using this function must have been opened using either the NANDSimpleSafeOpen or NANDSimpleSafeOpenAsync function. Appropriate permissions (both read and write) must be set for the parent directory of the file to which NANDSimpleSafe-related functions are applied.
The callback specified with this function might receive NAND_RESULT_ALLOC_FAILED or NAND_RESULT_BUSY when NAND_ACCESS_WRITE or NAND_ACCESS_RW is specified for accType when opening a file.
This function updates the FAT of the Wii console NAND memory.
NANDSimpleSafeOpen, NANDSimpleSafeOpenAsync, NANDSimpleSafeClose, NANDSimpleSafeCancel, NANDSimpleSafeCancelAsync
2008/07/29 Added information regarding the result code that the callback function might receive.
2008/05/13 Described the result codes passed to the callback function.
2008/04/23 Commented about updating the FAT.
2007/05/09 Initial version.
CONFIDENTIAL