Move remaining FileUtil functions into the File namespace.

This commit is contained in:
Henrik Rydgård committed 2021-04-25 20:38:22 +02:00
1 parent 0ccc63b43e
commit 1b13badeb4
32 files changed
+103 -103

No files matched your search

+4 -4
View File
@@ -386,7 +386,7 @@ static void CheckFailedGPUBackends() {
if (System_GetPropertyBool(SYSPROP_SUPPORTS_PERMISSIONS)) {
std::string data;
if (readFileToString(true, cache.c_str(), data))
if (File::readFileToString(true, cache.c_str(), data))
g_Config.sFailedGPUBackends = data;
}
@@ -414,7 +414,7 @@ static void CheckFailedGPUBackends() {
// Let's try to create, in case it doesn't exist.
if (!File::Exists(GetSysDirectory(DIRECTORY_APP_CACHE)))
File::CreateDir(GetSysDirectory(DIRECTORY_APP_CACHE));
writeStringToFile(true, g_Config.sFailedGPUBackends, cache.c_str());
File::writeStringToFile(true, g_Config.sFailedGPUBackends, cache.c_str());
} else {
// Just save immediately, since we have storage.
g_Config.Save("got storage permission");
@@ -1023,8 +1023,8 @@ void TakeScreenshot() {
snprintf(filename, sizeof(filename), "%s/%s_%05d.png", path.c_str(), gameId.c_str(), i);
else
snprintf(filename, sizeof(filename), "%s/%s_%05d.jpg", path.c_str(), gameId.c_str(), i);
FileInfo info;
if (!getFileInfo(filename, &info))
File::FileInfo info;
if (!File::Exists(filename))
break;
i++;
}