[IO] std::filesystem is no longer experimental

This commit is contained in:
RektInator 2019-10-02 11:37:08 +02:00
parent 138d6ad1dd
commit 875bc6679a

View File

@ -81,24 +81,24 @@ namespace Utils
bool CreateDir(const std::string& dir) bool CreateDir(const std::string& dir)
{ {
return std::experimental::filesystem::create_directories(dir); return std::filesystem::create_directories(dir);
} }
bool DirectoryExists(const std::string& directory) bool DirectoryExists(const std::string& directory)
{ {
return std::experimental::filesystem::is_directory(directory); return std::filesystem::is_directory(directory);
} }
bool DirectoryIsEmpty(const std::string& directory) bool DirectoryIsEmpty(const std::string& directory)
{ {
return std::experimental::filesystem::is_empty(directory); return std::filesystem::is_empty(directory);
} }
std::vector<std::string> ListFiles(const std::string& dir) std::vector<std::string> ListFiles(const std::string& dir)
{ {
std::vector<std::string> files; std::vector<std::string> files;
for (auto& file : std::experimental::filesystem::directory_iterator(dir)) for (auto& file : std::filesystem::directory_iterator(dir))
{ {
files.push_back(file.path().generic_string()); files.push_back(file.path().generic_string());
} }