diff --git a/source/cli/Config/Config.cpp b/source/cli/Config/Config.cpp index 2a32bd6..9375d76 100644 --- a/source/cli/Config/Config.cpp +++ b/source/cli/Config/Config.cpp @@ -1,5 +1,10 @@ #include "Config.h" +bool Config::exists() +{ + return std::filesystem::exists(_target_path); +} + bool Config::load() { auto config_opt = json::open(_target_path); diff --git a/source/cli/Config/Config.h b/source/cli/Config/Config.h index 4db5001..568e31b 100644 --- a/source/cli/Config/Config.h +++ b/source/cli/Config/Config.h @@ -12,6 +12,7 @@ class Config virtual ~Config() = default; public: + virtual bool exists(); virtual bool parse(const json::value& config_json) = 0; virtual bool load(); virtual json::value to_json() = 0;