#include #include #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; }