Manager+Test: Move exclude paths and system directories to config

This commit is contained in:
Riyyi
2022-02-08 23:39:12 +01:00
parent da91c4b3fd
commit 16947b93e2
5 changed files with 19 additions and 49 deletions
-17
View File
@@ -25,25 +25,11 @@ public:
Push,
};
enum class ExcludeType {
File,
Directory,
EndsWith,
};
struct ExcludePath {
ExcludeType type;
std::string path;
};
void add(const std::vector<std::string>& targets = {});
void list(const std::vector<std::string>& targets = {});
void pull(const std::vector<std::string>& targets = {});
void push(const std::vector<std::string>& targets = {});
void setSystemDirectories(const std::vector<std::filesystem::path>& systemDirectories) { m_systemDirectories = systemDirectories; }
void setExcludePaths(const std::vector<ExcludePath>& excludePaths) { m_excludePaths = excludePaths; }
private:
void pullOrPush(SyncType type, const std::vector<std::string>& targets = {});
void sync(SyncType type,
@@ -56,9 +42,6 @@ private:
bool filter(const std::filesystem::path& path);
bool include(const std::filesystem::path& path, const std::vector<std::string>& targets);
bool isSystemTarget(const std::string& target);
std::vector<ExcludePath> m_excludePaths;
std::vector<std::filesystem::path> m_systemDirectories;
};
#endif // DOTFILE_H