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:
Sandy Carter
2020-04-09 10:17:13 -04:00
committed by Rick Gibbed
parent c8e64da4eb
commit 69bcf59c79
13 changed files with 11 additions and 28 deletions

View File

@@ -202,7 +202,7 @@ void PipelineCache::InitializeShaderStorage(
// cost - though D3D's internal validation would possibly be enough to ensure
// they are up to date).
auto shader_storage_shareable_root = shader_storage_root / "shareable";
if (!xe::filesystem::CreateFolder(shader_storage_shareable_root)) {
if (!std::filesystem::create_directories(shader_storage_shareable_root)) {
return;
}

View File

@@ -47,7 +47,7 @@ std::pair<std::filesystem::path, std::filesystem::path> Shader::Dump(
auto target_path = base_path;
if (!target_path.empty()) {
target_path = std::filesystem::absolute(target_path);
xe::filesystem::CreateFolder(target_path);
std::filesystem::create_directories(target_path);
}
auto base_name =

View File

@@ -33,7 +33,7 @@ bool TraceWriter::Open(const std::filesystem::path& path, uint32_t title_id) {
auto canonical_path = std::filesystem::absolute(path);
if (canonical_path.has_parent_path()) {
auto base_path = canonical_path.parent_path();
xe::filesystem::CreateFolder(base_path);
std::filesystem::create_directories(base_path);
}
file_ = xe::filesystem::OpenFile(canonical_path, "wb");