mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-24 04:26:25 +12:00
[FS] Cleanup, stub SDMC, start implementing SaveData
This commit is contained in:
parent
8cf55162d0
commit
b6a1da21a9
13 changed files with 135 additions and 15 deletions
include/fs
|
@ -56,6 +56,16 @@ struct FileSession {
|
|||
}
|
||||
};
|
||||
|
||||
struct ArchiveSession {
|
||||
ArchiveBase* archive = nullptr;
|
||||
FSPath path;
|
||||
bool isOpen;
|
||||
|
||||
ArchiveSession(ArchiveBase* archive, const FSPath& filePath, bool isOpen = true) : archive(archive), isOpen(isOpen) {
|
||||
path = filePath;
|
||||
}
|
||||
};
|
||||
|
||||
class ArchiveBase {
|
||||
protected:
|
||||
using Result = u32;
|
||||
|
@ -67,7 +77,7 @@ public:
|
|||
virtual u64 getFreeBytes() = 0;
|
||||
virtual bool openFile(const FSPath& path) = 0;
|
||||
|
||||
virtual ArchiveBase* openArchive(FSPath& path) = 0;
|
||||
virtual ArchiveBase* openArchive(const FSPath& path) = 0;
|
||||
|
||||
// Read size bytes from a file starting at offset "offset" into a certain buffer in memory
|
||||
// Returns the number of bytes read, or nullopt if the read failed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue