-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlibrary.hpp
40 lines (27 loc) · 828 Bytes
/
library.hpp
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
34
35
36
37
38
39
40
#ifndef JEC_CPP_LIBRARY_HPP
#define JEC_CPP_LIBRARY_HPP
#include <experimental/filesystem>
#include <sys/stat.h>
#include <fstream>
#include <unistd.h>
namespace fs = std::experimental::filesystem;
namespace library {
class Config {
protected:
static fs::path rm_filename(fs::path& path);
public:
static bool exists(fs::path& path);
};
class ConfigFile : public Config{
public:
static void remove(fs::path& path);
static void create(fs::path& path, std::string& name);
static std::string from_home(fs::path& path);
};
class ConfigDir : public Config {
static void remove(fs::path& path);
static void create(fs::path& path, char name);
static std::string from_home(fs::path& path);
};
}
#endif //JEC_CPP_LIBRARY_HPP