Merge pull request #5187 from Morph1984/revert-stdfs

fs: Revert all std::filesystem changes
This commit is contained in:
bunnei
2020-12-11 20:07:37 -08:00
committed by GitHub
3 changed files with 396 additions and 142 deletions

View File

@ -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;
}