Merge pull request #5187 from Morph1984/revert-stdfs
fs: Revert all std::filesystem changes
This commit is contained in:
commit
c918c6480f
3 changed files with 396 additions and 142 deletions
|
@ -94,13 +94,9 @@ VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) {
|
|||
|
||||
VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) {
|
||||
const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault);
|
||||
const auto parent_path = FS::GetParentPath(path);
|
||||
|
||||
const auto path_fwd = FS::SanitizePath(path, FS::DirectorySeparator::ForwardSlash);
|
||||
if (!FS::Exists(path)) {
|
||||
if (!FS::CreateDirs(parent_path)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FS::CreateFullPath(path_fwd);
|
||||
if (!FS::CreateEmptyFile(path)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue