mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 03:29:45 +00:00
bdf282adbd
- Remove screenshot function since rosalina can now be used. - Fixed device ID display on GUI. - Lowered size for WiFi and Storage menu in GUI - Console will now exit with any button excluding the rosalina activation buttons.
42 lines
774 B
C
42 lines
774 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "fs.h"
|
|
#include "utils.h"
|
|
|
|
Result FS_OpenArchive(FS_Archive *archive, FS_ArchiveID archiveID)
|
|
{
|
|
Result ret = 0;
|
|
|
|
if (R_FAILED(ret = FSUSER_OpenArchive(archive, archiveID, fsMakePath(PATH_EMPTY, ""))))
|
|
return ret;
|
|
|
|
return 0;
|
|
}
|
|
|
|
Result FS_CloseArchive(FS_Archive archive)
|
|
{
|
|
Result ret = 0;
|
|
|
|
if (R_FAILED(ret = FSUSER_CloseArchive(archive)))
|
|
return ret;
|
|
|
|
return 0;
|
|
}
|
|
|
|
bool FS_FileExists(FS_Archive archive, const char *path)
|
|
{
|
|
Handle handle;
|
|
|
|
u16 path_u16[strlen(path) + 1];
|
|
Utils_U8_To_U16(path_u16, path, strlen(path) + 1);
|
|
|
|
if (R_FAILED(FSUSER_OpenFile(&handle, archive, fsMakePath(PATH_UTF16, path_u16), FS_OPEN_READ, 0)))
|
|
return false;
|
|
|
|
if (R_FAILED(FSFILE_Close(handle)))
|
|
return false;
|
|
|
|
return true;
|
|
}
|