Start adding config reader
This commit is contained in:
parent
6ff9370c4e
commit
cbc9ba77d2
14 changed files with 245 additions and 143 deletions
|
@ -100,9 +100,9 @@ std::vector<std::string> File::readLines()
|
|||
return content;
|
||||
}
|
||||
|
||||
std::string File::getBaseFilename(const std::string& path)
|
||||
std::string File::getBaseFilename(const Path& path)
|
||||
{
|
||||
return std::filesystem::path(path).stem();
|
||||
return path.stem().string();
|
||||
}
|
||||
|
||||
std::string File::ReadText()
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
using Path = std::filesystem::path;
|
||||
|
||||
class File
|
||||
{
|
||||
public:
|
||||
|
@ -34,7 +36,7 @@ public:
|
|||
|
||||
std::vector<std::string> readLines();
|
||||
|
||||
static std::string getBaseFilename(const std::string& path);
|
||||
static std::string getBaseFilename(const Path& path);
|
||||
|
||||
bool PathExists() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue