mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-12-03 19:33:33 +01:00
Common/FileSystem: Add EnsureDirectoryExists()
This commit is contained in:
1 parent
d6f1291c0b
commit
ed9f34de5f
2 files changed
+13
No files matched your search
@@ -565,6 +565,15 @@ bool FileSystem::WriteFileToString(const char* filename, const std::string_view&
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileSystem::EnsureDirectoryExists(const char* path, bool recursive)
|
||||
{
|
||||
if (FileSystem::DirectoryExists(path))
|
||||
return true;
|
||||
|
||||
// if it fails to create, we're not going to be able to use it anyway
|
||||
return FileSystem::CreateDirectoryPath(path, recursive);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
static u32 TranslateWin32Attributes(u32 Win32Attributes)
|
||||
|
||||
Reference in new issue
Block a user