blob: 13733c9d1375da72ac9b827d12b125dcb9712800 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|