aboutsummaryrefslogtreecommitdiff
path: root/src/Filesystem.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Filesystem.hpp')
-rw-r--r--src/Filesystem.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Filesystem.hpp b/src/Filesystem.hpp
new file mode 100644
index 0000000..13733c9
--- /dev/null
+++ b/src/Filesystem.hpp
@@ -0,0 +1,33 @@
+#ifndef FILESYSTEM_H
+#define FILESYSTEM_H 1
+
+#include <inja/inja.hpp>
+#include <string>
+#include <unordered_map>
+#include <vector>
+
+struct file_data
+{
+ std::vector<unsigned char> data;
+};
+
+class Filesystem
+{
+public:
+ Filesystem()
+ {
+ }
+ ~Filesystem()
+ {
+ }
+
+ bool AddSingleFile(std::string path, std::string root);
+ bool Scan(std::string root = "./wwwroot");
+ bool Scan(std::string root, std::vector<std::string> extensions, bool exclude_extensions = false);
+ const std::unordered_map<std::string, struct file_data> & GetFiles() const;
+
+private:
+ std::unordered_map<std::string, struct file_data> m_Files;
+};
+
+#endif