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
@@ -29,7 +29,7 @@ bool HostPathDevice::Initialize() {
|
||||
if (!std::filesystem::exists(host_path_)) {
|
||||
if (!read_only_) {
|
||||
// Create the path.
|
||||
xe::filesystem::CreateFolder(host_path_);
|
||||
std::filesystem::create_directories(host_path_);
|
||||
} else {
|
||||
XELOGE("Host path does not exist");
|
||||
return false;
|
||||
|
||||
@@ -77,7 +77,7 @@ std::unique_ptr<Entry> HostPathEntry::CreateEntryInternal(
|
||||
const std::string_view name, uint32_t attributes) {
|
||||
auto full_path = host_path_ / xe::to_path(name);
|
||||
if (attributes & kFileAttributeDirectory) {
|
||||
if (!xe::filesystem::CreateFolder(full_path)) {
|
||||
if (!std::filesystem::create_directories(full_path)) {
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -62,7 +62,7 @@ int vfs_dump_main(const std::vector<std::string>& args) {
|
||||
XELOGI("{}", entry->path());
|
||||
auto dest_name = base_path / xe::to_path(entry->path());
|
||||
if (entry->attributes() & kFileAttributeDirectory) {
|
||||
xe::filesystem::CreateFolder(dest_name);
|
||||
std::filesystem::create_directories(dest_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user