14 [[nodiscard]]
bool isValidSignature()
const {
15 return parse<u32>(signature) == U8_SIGNATURE;
26 [[nodiscard]]
bool isDirectory()
const {
30 [[nodiscard]] u32 stringOffset()
const {
31 return parse<u32>(val) & 0xFFFFFF;
57 [[nodiscard]] s32 convertPathToEntryId(
const char *path)
const;
58 bool open(s32 entryId,
FileInfo &info)
const;
61 [[nodiscard]]
void *getFileAddress(
const FileInfo &info)
const {
62 return static_cast<u8 *
>(m_startAddress) + info.startOffset;
65 [[nodiscard]] Node *node(s32 entryId)
const {
66 auto *nodeAddress =
static_cast<u8 *
>(m_nodesAddress) +
sizeof(Node) * entryId;
67 return reinterpret_cast<Node *
>(nodeAddress);
70 [[nodiscard]]
void *startAddress()
const {
71 return m_startAddress;
80 const char *m_strings;