Config file and package tracking utility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
819 B

/*
* Copyright (C) 2021 Riyyi
*
* SPDX-License-Identifier: MIT
*/
#ifndef DOTFILE_H
#define DOTFILE_H
#include <filesystem>
#include <string>
#include <vector>
namespace Util {
class Dotfile {
public:
Dotfile();
virtual ~Dotfile();
enum class ExcludeType {
File,
Directory,
EndsWith,
};
struct ExcludePath {
ExcludeType type;
std::string path;
};
static void list();
static void setWorkingDirectory(std::filesystem::path directory) { s_workingDirectory = directory; }
static void setExcludePaths(const std::vector<ExcludePath>& excludePaths) { s_excludePaths = excludePaths; }
private:
static bool filter(const std::filesystem::path& path);
static std::vector<ExcludePath> s_excludePaths;
static std::filesystem::path s_workingDirectory;
};
} // namespace Util
#endif // DOTFILE_H