#ifndef _ZIM_TREE_H #define _ZIM_TREE_H #include #include "node.h" #include #include class Tree { public: using statStruct = struct stat; std::unordered_map statCache; Tree(const std::string &path); std::pair attachNode(const std::string& path, Node* parent); std::pair attachFile(const std::string& path, Node* parent, int collisionCount); Node* findNode(const std::string& name); zim::Archive* getArchive() { return &zimArchive; } ~Tree(); private: std::unordered_map mappedNodes; zim::Archive zimArchive; Node::Ptr rootNode; }; #endif