Update ExtData branch to current codebase

Co-Authored-By: Ada Ahmed <ada@chronovore.dev>
This commit is contained in:
wheremyfoodat 2024-12-11 01:03:50 +02:00
parent 7257f34ff5
commit 667717ef91
7 changed files with 290 additions and 52 deletions

View file

@ -64,6 +64,14 @@ namespace ArchiveID {
}
} // namespace ArchiveID
namespace MediaType {
enum : u8 {
NAND = 0,
SD = 1,
Gamecard = 2,
};
};
struct FSPath {
u32 type = PathType::Invalid;
@ -246,6 +254,16 @@ class ArchiveBase {
return Result::FS::AlreadyExists;
}
virtual HorizonResult deleteDirectory(const FSPath& path) {
Helpers::warn("Stubbed DeleteDirectory for %s archive", name().c_str());
return Result::Success;
}
virtual HorizonResult deleteDirectoryRecursively(const FSPath& path) {
Helpers::warn("Stubbed DeleteDirectoryRecursively for %s archive", name().c_str());
return Result::Success;
}
// Returns nullopt if opening the file failed, otherwise returns a file descriptor to it (nullptr if none is needed)
virtual FileDescriptor openFile(const FSPath& path, const FilePerms& perms) = 0;
virtual Rust::Result<ArchiveBase*, HorizonResult> openArchive(const FSPath& path) = 0;