Fix code
This commit is contained in:
parent
9f98190944
commit
214719ff37
@ -80,24 +80,24 @@ namespace utils::io
|
|||||||
|
|
||||||
bool create_directory(const std::string& directory)
|
bool create_directory(const std::string& directory)
|
||||||
{
|
{
|
||||||
return std::experimental::filesystem::create_directories(directory);
|
return std::filesystem::create_directories(directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool directory_exists(const std::string& directory)
|
bool directory_exists(const std::string& directory)
|
||||||
{
|
{
|
||||||
return std::experimental::filesystem::is_directory(directory);
|
return std::filesystem::is_directory(directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool directory_is_empty(const std::string& directory)
|
bool directory_is_empty(const std::string& directory)
|
||||||
{
|
{
|
||||||
return std::experimental::filesystem::is_empty(directory);
|
return std::filesystem::is_empty(directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> list_files(const std::string& directory)
|
std::vector<std::string> list_files(const std::string& directory)
|
||||||
{
|
{
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
|
|
||||||
for (auto& file : std::experimental::filesystem::directory_iterator(directory))
|
for (auto& file : std::filesystem::directory_iterator(directory))
|
||||||
{
|
{
|
||||||
files.push_back(file.path().generic_string());
|
files.push_back(file.path().generic_string());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user