diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-04-27 15:15:40 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-04-27 15:15:40 +0200 |
commit | c0483779dac4d8fd5fcc736ae5ffa8ddede0e511 (patch) | |
tree | 42408069a518e15eb1052cc62a09d6855517cf5b /src/Filesystem.hpp | |
parent | 51d779256c74cc541da306db5629ed510df5a944 (diff) |
ContentManager / Filesystem classes as preparation for a SimpleBlog.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/Filesystem.hpp')
-rw-r--r-- | src/Filesystem.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Filesystem.hpp b/src/Filesystem.hpp new file mode 100644 index 0000000..139c214 --- /dev/null +++ b/src/Filesystem.hpp @@ -0,0 +1,25 @@ +#ifndef FILESYSTEM_H +#define FILESYSTEM_H 1 + +#include <map> +#include <string> +#include <vector> + +struct file_data { + bool inja_renderable; + std::vector<unsigned char> data; +}; + +class Filesystem { +public: + Filesystem() {} + ~Filesystem() {} + + bool AddSingleFile(std::string path, std::string root); + bool Scan(std::string root = "./wwwroot"); + +private: + std::map<std::string, struct file_data> files; +}; + +#endif |