mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Add RomFS directory traversal stuff
This commit is contained in:
parent
f3ce29bf2d
commit
2de35bd39d
2 changed files with 128 additions and 4 deletions
|
@ -1,13 +1,22 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace RomFS {
|
||||
|
||||
struct RomFSNode {
|
||||
std::vector<RomFSNode> children;
|
||||
std::u16string name {};
|
||||
// The file/directory offset relative to the start of the RomFS
|
||||
u64 offset { 0 };
|
||||
u64 size { 0 };
|
||||
bool isDirectory { false };
|
||||
|
||||
std::vector<std::unique_ptr<RomFSNode>> directories {};
|
||||
std::vector<std::unique_ptr<RomFSNode>> files {};
|
||||
};
|
||||
|
||||
RomFSNode parseRomFSTree(uintptr_t romFS, u64 romFSSize);
|
||||
std::unique_ptr<RomFSNode> parseRomFSTree(uintptr_t romFS, u64 romFSSize);
|
||||
|
||||
} // namespace RomFS
|
Loading…
Add table
Add a link
Reference in a new issue