Result FSUSER_CreateDirectory(Handle* handle, FS_archive archive, FS_path dirLowPath);
Result FSUSER_DeleteFile(Handle *handle, FS_archive archive, FS_path fileLowPath);
Result FSUSER_DeleteDirectory(Handle *handle, FS_archive archive, FS_path dirLowPath);
-Result FSUSER_IsSdmcDetected(Handle *handle);
-Result FSUSER_IsSdmcWritable(Handle *handle);
+Result FSUSER_IsSdmcDetected(Handle *handle, u32 *detected);
+Result FSUSER_IsSdmcWritable(Handle *handle, u32 *writable);
Result FSFILE_Close(Handle handle);
Result FSFILE_Read(Handle handle, u32 *bytesRead, u64 offset, void *buffer, u32 size);
/*! Check if SD card is detected
*
- * @param[in] handle fs:USER handle
+ * @param[in] handle fs:USER handle
+ * @param[out] detected Output detected state
*
* @returns error
*
* 1 | Result code
*/
Result
-FSUSER_IsSdmcDetected(Handle *handle)
+FSUSER_IsSdmcDetected(Handle *handle,
+ u32 *detected)
{
if(!handle)
handle = &fsuHandle;
if((ret = svcSendSyncRequest(*handle)))
return ret;
+ if(detected)
+ *detected = cmdbuf[2];
+
return cmdbuf[1];
}
/*! Check if SD card is writable
*
- * @param[in] handle fs:USER handle
+ * @param[in] handle fs:USER handle
+ * @param[out] writable Output writable state
*
* @returns error
*
* 1 | Result code
*/
Result
-FSUSER_IsSdmcWritable(Handle *handle)
+FSUSER_IsSdmcWritable(Handle *handle,
+ u32 *writable)
{
if(!handle)
handle = &fsuHandle;
if((ret = svcSendSyncRequest(*handle)))
return ret;
+ if(writable)
+ *writable = cmdbuf[2];
+
return cmdbuf[1];
}