mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-07 15:52:59 +12:00
Some checks are pending
Android Build / x64 (release) (push) Waiting to run
Android Build / arm64 (release) (push) Waiting to run
HTTP Server Build / build (push) Waiting to run
Hydra Core Build / Windows (push) Waiting to run
Hydra Core Build / MacOS (push) Waiting to run
Hydra Core Build / Linux (push) Waiting to run
Hydra Core Build / Android-x64 (push) Waiting to run
Hydra Core Build / ARM-Libretro (push) Waiting to run
Linux AppImage Build / build (push) Waiting to run
Linux Build / build (push) Waiting to run
MacOS Build / MacOS-arm64 (push) Waiting to run
MacOS Build / MacOS-x86_64 (push) Waiting to run
MacOS Build / MacOS-Universal (push) Blocked by required conditions
Qt Build / Windows (push) Waiting to run
Qt Build / MacOS-arm64 (push) Waiting to run
Qt Build / MacOS-x86_64 (push) Waiting to run
Qt Build / MacOS-Universal (push) Blocked by required conditions
Qt Build / Linux (push) Waiting to run
Windows Build / build (push) Waiting to run
iOS Simulator Build / build (push) Waiting to run
32 lines
No EOL
1 KiB
C++
32 lines
No EOL
1 KiB
C++
#pragma once
|
|
#include "archive_base.hpp"
|
|
|
|
class NCCHArchive : public ArchiveBase {
|
|
public:
|
|
NCCHArchive(Memory& mem) : ArchiveBase(mem) {}
|
|
|
|
u64 getFreeBytes() override {
|
|
Helpers::panic("NCCH::GetFreeBytes unimplemented");
|
|
return 0;
|
|
}
|
|
std::string name() override { return "NCCH"; }
|
|
|
|
HorizonResult createFile(const FSPath& path, u64 size) override;
|
|
HorizonResult deleteFile(const FSPath& path) override;
|
|
|
|
Rust::Result<ArchiveBase*, HorizonResult> openArchive(const FSPath& path) override;
|
|
FileDescriptor openFile(const FSPath& path, const FilePerms& perms) override;
|
|
std::optional<u32> readFile(FileSession* file, u64 offset, u32 size, u32 dataPointer) override;
|
|
|
|
// Returns whether the cart has a RomFS
|
|
bool hasRomFS() {
|
|
auto cxi = mem.getCXI();
|
|
return (cxi != nullptr && cxi->hasRomFS());
|
|
}
|
|
|
|
// Returns whether the cart has an ExeFS (All executable carts should have an ExeFS. This is just here to be safe)
|
|
bool hasExeFS() {
|
|
auto cxi = mem.getCXI();
|
|
return (cxi != nullptr && cxi->hasExeFS());
|
|
}
|
|
}; |