Cafe SDK  Version 2.13
API References for nn Library Modules
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Typedefs | Enumerations | Functions
Temporary Directory (TEMP) API

A list of TEMP library members. (Includes only C API members.)) More...

Typedefs

typedef u64 TEMPDirID
 TEMP directory ID.
 

Enumerations

enum  TEMPDevicePreference {
  TEMP_DEVICE_PREFERENCE_FREE_SPACE = 0,
  TEMP_DEVICE_PREFERENCE_ACCESS_SPEED = 1,
  TEMP_DEVICE_PREFERENCE_DEFAULT = TEMP_DEVICE_PREFERENCE_FREE_SPACE
}
 Specifies criteria for selecting the device to use when creating the TEMP directory. More...
 

Functions

TEMPStatus TEMPChangeDir (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSRetFlag errHandling)
 Changes the current directory. More...
 
TEMPStatus TEMPChangeDirAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Changes the current directory. More...
 
TEMPStatus TEMPChangeOthersMode (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSMode mode, FSRetFlag errHandling)
 Modifies the Others read permission so that other processes can access the temporary directory. More...
 
TEMPStatus TEMPChangeOthersModeAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSMode mode, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Modifies the Others read permission so that other processes can access the temporary directory. More...
 
TEMPStatus TEMPCreateAndInitTempDir (u32 maxSize, TEMPDevicePreference pref, TEMPDirID *pDirID)
 Creates and initializes the TEMP directory. More...
 
TEMPStatus TEMPGetFreeSpaceSize (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, FSFreeSpaceSize *pSize, FSRetFlag errHandling)
 Gets the amount of free space remaining in the temporary directory. More...
 
TEMPStatus TEMPGetFreeSpaceSizeAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, FSFreeSpaceSize *pSize, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Gets the amount of free space remaining in the temporary directory. (Asynchronous version.) More...
 
TEMPStatus TEMPGetStat (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSStat *pReturnedStat, FSRetFlag errHandling)
 Gets the Stat information for the target. More...
 
TEMPStatus TEMPGetStatAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSStat *pReturnedStat, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Gets the Stat information for the target. More...
 
TEMPStatus TEMPInit (void)
 Initializes the TEMP library. The TEMPInit function always succeeds. More...
 
TEMPStatus TEMPMakeDir (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSRetFlag errHandling)
 Creates a directory. More...
 
TEMPStatus TEMPMakeDirAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Creates a directory. More...
 
TEMPStatus TEMPOpenDir (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSDirHandle *pDirHandle, FSRetFlag errHandling)
 Opens a directory and creates a directory stream. More...
 
TEMPStatus TEMPOpenDirAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSDirHandle *pDirHandle, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Opens a directory and creates a directory stream. More...
 
TEMPStatus TEMPOpenFile (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, const char *mode, FSFileHandle *pFileHandle, FSRetFlag errHandling)
 Opens a file. More...
 
TEMPStatus TEMPOpenFileAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, const char *mode, FSFileHandle *pFileHandle, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Opens a file. More...
 
TEMPStatus TEMPOpenNewFile (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, const char *mode, u32 size, FSFileHandle *pFileHandle, FSRetFlag errHandling)
 Opens and appends a new file to the TEMP directory. This function has not yet been fully implemented, so it currently returns TEMP_STATUS_UNSUPPORTED_CMD. More...
 
TEMPStatus TEMPOpenNewFileAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, const char *mode, u32 size, FSFileHandle *pFileHandle, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Opens and appends a new file to the TEMP directory. This function has not yet been fully implemented, so it currently returns TEMP_STATUS_UNSUPPORTED_CMD. More...
 
TEMPStatus TEMPRemove (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSRetFlag errHandling)
 Removes the target object. More...
 
TEMPStatus TEMPRemoveAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *path, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Removes the target object. More...
 
TEMPStatus TEMPRename (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *oldPath, const char *newPath, FSRetFlag errHandling)
 Modifies the name of the target object. More...
 
TEMPStatus TEMPRenameAsync (FSClient *pClient, FSCmdBlock *pCmd, TEMPDirID dirID, const char *oldPath, const char *newPath, FSRetFlag errHandling, const FSAsyncParams *pAsyncParams)
 Modifies the name of the target object. More...
 
void TEMPShutdown (void)
 Shuts down the TEMP library. The time it takes for the TEMPShutdown function to complete varies depending on the number and size of files created in the TEMP directory in addition to the structure of the directory. More...
 
TEMPStatus TEMPShutdownTempDir (TEMPDirID dirID)
 Deletes the TEMP directory, including all of its contents. The time it takes for the TEMPShutdownTempDir function to complete varies depending on the number and size of files created in the TEMP directory and the structure of the directory. More...
 

Detailed Description

A list of TEMP library members. (Includes only C API members.))

Enumeration Type Documentation

Specifies criteria for selecting the device to use when creating the TEMP directory.

Enumerator
TEMP_DEVICE_PREFERENCE_FREE_SPACE 

Prioritize free space: Select the device with the most free storage space.

TEMP_DEVICE_PREFERENCE_ACCESS_SPEED 

Prioritize speed: Select the device with the fastest access speed.

TEMP_DEVICE_PREFERENCE_DEFAULT 

Default setting: Prioritize free space.

Function Documentation

TEMPStatus TEMPChangeDir ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSRetFlag  errHandling 
)

Changes the current directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe path to the directory to change the current directory to. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMPStatus TEMPChangeDirAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Changes the current directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe path to the directory to change the current directory to. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPChangeOthersMode ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSMode  mode,
FSRetFlag  errHandling 
)

Modifies the Others read permission so that other processes can access the temporary directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]modeThe access mode. You can specify one of the following values for the permission. FS_MODE_IROTH: Adds read permission. 0: Removes read permission.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_ALREADY_OPENOne or more files or directories in the source path or path to modify is already open.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
TEMPStatus TEMPChangeOthersModeAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSMode  mode,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Modifies the Others read permission so that other processes can access the temporary directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]modeThe access mode. You can specify one of the following values for the permission. FS_MODE_IROTH: Adds read permission. 0: Removes read permission.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_ALREADY_OPENOne or more files or directories in the source path or path to modify is already open.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPCreateAndInitTempDir ( u32  maxSize,
TEMPDevicePreference  pref,
TEMPDirID pDirID 
)

Creates and initializes the TEMP directory.

The maxSize and pref parameters are used to select the target device where the system creates the region for the temporary directory.

Parameters
[in]maxSizeSpecifies the maximum size (in bytes) for the total size of all files that the application might store in the temporary directory. The maximum value of this parameter is 4,294,967,295 bytes. This value is used when selecting the storage device where the system creates the region for the TEMP directory.
[in]prefThe setting for selecting the target device when the system creates the temporary directory. This value is used when selecting the storage device where the system creates the region for the TEMP directory.
[out]pDirIDPointer fo the ID of the TEMP directory.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_EXISTSThat temporary directory already exists.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_INVALID_PARAMInvalid parameter.
TEMP_STATUS_FATAL_ERRORThe library is not initialized.
TEMPStatus TEMPGetFreeSpaceSize ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
FSFreeSpaceSize *  pSize,
FSRetFlag  errHandling 
)

Gets the amount of free space remaining in the temporary directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[out]pSizeAmount of free space, in bytes.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMPStatus TEMPGetFreeSpaceSizeAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
FSFreeSpaceSize *  pSize,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Gets the amount of free space remaining in the temporary directory. (Asynchronous version.)

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[out]pSizeAmount of free space, in bytes.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPGetStat ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSStat *  pReturnedStat,
FSRetFlag  errHandling 
)

Gets the Stat information for the target.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe file path to follow to get the status information. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[out]*pReturnedStatPointer to the status information.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_FATAL_ERRORInvalid parameter or the library is not initialized.
TEMPStatus TEMPGetStatAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSStat *  pReturnedStat,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Gets the Stat information for the target.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe file path to follow to get the status information. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[out]*pReturnedStatPointer to the status information.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_FATAL_ERRORInvalid parameter or the library is not initialized.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPInit ( void  )

Initializes the TEMP library. The TEMPInit function always succeeds.

Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMPStatus TEMPMakeDir ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSRetFlag  errHandling 
)

Creates a directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_EXISTSA directory with the target path already exists.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
TEMPStatus TEMPMakeDirAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Creates a directory.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_EXISTSA directory with the target path already exists.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPOpenDir ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSDirHandle *  pDirHandle,
FSRetFlag  errHandling 
)

Opens a directory and creates a directory stream.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[out]pDirHandlePointer to the directory stream handle associated with the directory being opened.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_NOT_DIRThe specified path is not a directory path (not a directory).
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMPStatus TEMPOpenDirAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSDirHandle *  pDirHandle,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Opens a directory and creates a directory stream.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[out]pDirHandlePointer to the directory stream handle associated with the directory being opened.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_NOT_DIRThe specified path is not a directory path (not a directory).
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPOpenFile ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
const char *  mode,
FSFileHandle *  pFileHandle,
FSRetFlag  errHandling 
)

Opens a file.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]modeA short string parameter that specifies the access mode. The length must be less than FS_MAX_MODE_SIZE. The following values can be specified with the parameter.
"r" : Opens a file for reading. The file must exist already.
"w" : Creates an empty file for writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a" : Adds data to a file. When writing, data is added to the end of the file. If the file does not exist, it is created.
"r+" : Opens a file for reading and writing so it can be updated. The specified file must exist already.
"w+" : Creates an empty file for reading and writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a+" : Opens a file for reading and adding data. All writing is done to the end of the file to prevent the previous content from being overwritten. The internal pointer can be relocated to any position in the file when reading, but it gets returned to the end of the file when writing. If the file does not exist, it is created.
[out]pFileHandlePointer to the file stream handle associated with the file being opened.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_ALREADY_OPENThis file is already open. Attempted to open the file using an invalid procedure.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_NOT_FILEThe specified path is not a file path (not a file).
TEMP_STATUS_MAXNo more files can be created because the number of system file points is too large.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMPStatus TEMPOpenFileAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
const char *  mode,
FSFileHandle *  pFileHandle,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Opens a file.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]modeA short string parameter that specifies the access mode. The length must be less than FS_MAX_MODE_SIZE. The following values can be specified with the parameter.
"r" : Opens a file for reading. The file must exist already.
"w" : Creates an empty file for writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a" : Adds data to a file. When writing, data is added to the end of the file. If the file does not exist, it is created.
"r+" : Opens a file for reading and writing so it can be updated. The specified file must exist already.
"w+" : Creates an empty file for reading and writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a+" : Opens a file for reading and adding data. All writing is done to the end of the file to prevent the previous content from being overwritten. The internal pointer can be relocated to any position in the file when reading, but it gets returned to the end of the file when writing. If the file does not exist, it is created.
[out]pFileHandlePointer to the file stream handle associated with the file being opened.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_ALREADY_OPENThis file is already open. Attempted to open the file using an invalid procedure.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_NOT_FILEThe specified path is not a file path (not a file).
TEMP_STATUS_MAXNo more files can be created because the number of system file points is too large.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPOpenNewFile ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
const char *  mode,
u32  size,
FSFileHandle *  pFileHandle,
FSRetFlag  errHandling 
)

Opens and appends a new file to the TEMP directory. This function has not yet been fully implemented, so it currently returns TEMP_STATUS_UNSUPPORTED_CMD.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]modeA short string parameter that specifies the access mode. The length must be less than FS_MAX_MODE_SIZE. The following values can be specified with the parameter.
"r" : Opens a file for reading. The file must exist already.
"w" : Creates an empty file for writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a" : Adds data to a file. When writing, data is added to the end of the file. If the file does not exist, it is created.
"r+" : Opens a file for reading and writing so it can be updated. The specified file must exist already.
"w+" : Creates an empty file for reading and writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a+" : Opens a file for reading and adding data. All writing is done to the end of the file to prevent the previous content from being overwritten. The internal pointer can be relocated to any position in the file when reading, but it gets returned to the end of the file when writing. If the file does not exist, it is created.
[out]pFileHandlePointer to the file stream handle associated with the file being opened.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_ALREADY_OPENThis file is already open. Attempted to open the file using an invalid procedure.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_NOT_FILEThe specified path is not a file path (not a file).
TEMP_STATUS_MAXNo more files can be created because the number of system file points is too large.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMPStatus TEMPOpenNewFileAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
const char *  mode,
u32  size,
FSFileHandle *  pFileHandle,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Opens and appends a new file to the TEMP directory. This function has not yet been fully implemented, so it currently returns TEMP_STATUS_UNSUPPORTED_CMD.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathThe relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]modeA short string parameter that specifies the access mode. The length must be less than FS_MAX_MODE_SIZE. The following values can be specified with the parameter.
"r" : Opens a file for reading. The file must exist already.
"w" : Creates an empty file for writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a" : Adds data to a file. When writing, data is added to the end of the file. If the file does not exist, it is created.
"r+" : Opens a file for reading and writing so it can be updated. The specified file must exist already.
"w+" : Creates an empty file for reading and writing. If a file with the same name already exists, the content is erased and the file is treated as a new, empty file.
"a+" : Opens a file for reading and adding data. All writing is done to the end of the file to prevent the previous content from being overwritten. The internal pointer can be relocated to any position in the file when reading, but it gets returned to the end of the file when writing. If the file does not exist, it is created.
[out]pFileHandlePointer to the file stream handle associated with the file being opened.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_ALREADY_OPENThis file is already open. Attempted to open the file using an invalid procedure.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_NOT_FILEThe specified path is not a file path (not a file).
TEMP_STATUS_MAXNo more files can be created because the number of system file points is too large.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPRemove ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSRetFlag  errHandling 
)

Removes the target object.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathPath of the file or directory to delete. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_ALREADY_OPENThe file or directory with the specified path is still open.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
TEMPStatus TEMPRemoveAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  path,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Removes the target object.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]pathPath of the file or directory to delete. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_ALREADY_OPENThe file or directory with the specified path is still open.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
TEMPStatus TEMPRename ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  oldPath,
const char *  newPath,
FSRetFlag  errHandling 
)

Modifies the name of the target object.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]oldPathPath of the file or directory whose name is being changed. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]newPathThe new path to the new file or directory This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_ALREADY_OPENOne or more files or directories in the source path or path to modify is already open.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
TEMPStatus TEMPRenameAsync ( FSClient *  pClient,
FSCmdBlock *  pCmd,
TEMPDirID  dirID,
const char *  oldPath,
const char *  newPath,
FSRetFlag  errHandling,
const FSAsyncParams *  pAsyncParams 
)

Modifies the name of the target object.

Parameters
[in]pClientPointer to the client buffer.
[in]pCmdThe command block.
[in]dirIDThe TEMP directory ID.
[in]oldPathPath of the file or directory whose name is being changed. This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]newPathThe new path to the new file or directory This path is the relative path from the root path of the temporary directory specified by the TEMP directory ID. The length must be less than FS_MAX_ARGPATH_SIZE.
[in]errHandlingFlag for automatic error handling. Only reported errors are returned.
[in]pAsyncParamsNotification parameters for asynchronous calls.
Returns
Returns the function execution result using a callback.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_CANCELEDThe command was canceled.
TEMP_STATUS_NOT_FOUNDTarget not found.
TEMP_STATUS_PERMISSION_ERRORThe caller does not have the appropriate access permissions.
TEMP_STATUS_ALREADY_OPENOne or more files or directories in the source path or path to modify is already open.
TEMP_STATUS_STORAGE_FULLIndicates that a data region for updating the directory tree cannot be allocated.
TEMP_STATUS_JOURNAL_FULLThe journaling region is full. A new journaling block cannot be allocated.
Returns
Immediate return values for asynchronous API functions.
Return values
TEMP_STATUS_OKThe request was issued normally.
TEMP_STATUS_FATAL_ERRORInvalid parameter.
void TEMPShutdown ( void  )

Shuts down the TEMP library. The time it takes for the TEMPShutdown function to complete varies depending on the number and size of files created in the TEMP directory in addition to the structure of the directory.

Returns
None.
TEMPStatus TEMPShutdownTempDir ( TEMPDirID  dirID)

Deletes the TEMP directory, including all of its contents. The time it takes for the TEMPShutdownTempDir function to complete varies depending on the number and size of files created in the TEMP directory and the structure of the directory.

Parameters
[in]dirIDThe TEMP directory ID.
Returns
Returns the result of the function.
Return values
TEMP_STATUS_OKThe process ended normally.
TEMP_STATUS_ALREADY_OPENThe TEMP directory cannot be deleted because one or more of its files or directories is still open.
TEMP_STATUS_FATAL_ERRORThe library is not initialized.