filesystem: use std for CreateFolder
Remove custom platform implementation of `CreateFolder` and replace uses with `std::filesystem::create_directories` which creates paths recursively.
This commit is contained in:
committed by
Rick Gibbed
parent
c8e64da4eb
commit
69bcf59c79
@@ -61,15 +61,6 @@ std::filesystem::path GetUserFolder() {
|
||||
return result;
|
||||
}
|
||||
|
||||
bool CreateFolder(const std::filesystem::path& path) {
|
||||
std::filesystem::path create_path;
|
||||
for (auto it = path.begin(); it != path.end(); ++it) {
|
||||
create_path /= *it;
|
||||
CreateDirectoryW(create_path.c_str(), nullptr);
|
||||
}
|
||||
return std::filesystem::exists(path);
|
||||
}
|
||||
|
||||
bool DeleteFolder(const std::filesystem::path& path) {
|
||||
auto double_null_path = path.wstring() + std::wstring(L"\0", 1);
|
||||
SHFILEOPSTRUCT op = {0};
|
||||
|
||||
Reference in New Issue
Block a user