Add RomFS directory traversal stuff
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user