#include <cafe/fs.h> FSStatus FSGetMountSource( FSClient *client, FSCmdBlock *block, FSSourceType type, FSMountSource *source, FSRetFlag errHandling ); FSStatus FSGetMountSourceAsync( FSClient *client, FSCmdBlock *block, FSSourceType type, FSMountSource *source, FSRetFlag errHandling, const FSAsyncParams *asyncParams );
|client||Pointer of client buffer.|
|source||Pointer to an available mountable source.
For more information, see
|errHandling||Auto error handling flag. Only indicated errors are returned.|
|asyncParams||(Async API only) Notification parameters for the asynchronous call.|
||Successfully retrieved the next available mount source.|
||There are no more available mount sources.|
||This function use a directory handle. All the directory handles are already used.|
||The command was canceled.|
||Successfully issued request.|
||The argument was invalid.|
Find and get one of the available mountable sources of the specified type. This function is for manually mounted external devices (SD with FAT) and Host File IO (HFIO) volume.
If multiple volumes are available for the specified type, the first one on the list is returned. Use
FSGetMountSourceNext to get the rest. The context for this procedure is stored per
Both a sync and async style API are provided. To use the async API, set user the callback and parameters in asyncParams.
For more information, see
If this API returns
FS_STATUS_END at the first call, it means that any device was not found for the specified
type. Since this case is not regarded as an error, do not handle the case using the error handling
functions such as
Use the error handling functions for other cases, such as
file operation functions for the mounted device, which always return an error if the device is not present.
Cafe SDK supports SD cards on the FS layer only as manually mounted devices. For information about mounting devices manually, see File System Overview. For information about see how to mount and access SD cards, see FS Demos.
|Thread that displays graphics||Do not call this function from a thread that displays graphics. This function may block indefinitely in error cases and the application must be able to display appropriate messages.|
|Thread that handles system messages||Do not call this function from a thread that handles system messages. This function may block indefinitely in error cases and the application must be able to handle system events such as shutdown.|
|Callbacks||Do not call this function from any callback function.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
2014/09/16 Added "Thread that displays graphics" and "Thread that handles system messages" to "Do not call from".
2013/12/11 The permission from Nintendo to use SD Cards for production applications is no longer required.
2013/12/11 Added description that being returned FS_STATUS_END immediately means no valid device is present.
2013/05/08 Automated cleanup pass.
2013/01/10 Added "Callback" to "Do not call from".
2012/11/20 Replaced "FAT32" to "FAT".
2012/07/19 Readability cleanup.
2010/12/12 Initial version.