[VFS] Change file attributes or timestamps.

Changing these options is only viable for r/w mounted host devices (Cache)
Changing attributes works only on windows
Changing timestamps is mocked and logged to see if there is any title that uses it
This commit is contained in:
Gliniak
2024-08-15 17:13:19 +02:00
parent c68b09d717
commit 49584ff664
8 changed files with 86 additions and 0 deletions

View File

@@ -128,6 +128,8 @@ std::vector<FileInfo> ListDirectories(const std::filesystem::path& path);
std::vector<FileInfo> FilterByName(const std::vector<FileInfo>& files,
const std::regex pattern);
bool SetAttributes(const std::filesystem::path& path, uint64_t attributes);
#if XE_PLATFORM_ANDROID
void AndroidInitialize();
void AndroidShutdown();

View File

@@ -274,5 +274,9 @@ int OpenAndroidContentFileDescriptor(const std::string_view uri,
return file_descriptor;
}
bool SetAttributes(const std::filesystem::path& path, uint64_t attributes) {
return false;
}
} // namespace filesystem
} // namespace xe

View File

@@ -243,5 +243,9 @@ std::vector<FileInfo> ListFiles(const std::filesystem::path& path) {
return result;
}
bool SetAttributes(const std::filesystem::path& path, uint64_t attributes) {
return false;
}
} // namespace filesystem
} // namespace xe

View File

@@ -285,5 +285,9 @@ std::vector<FileInfo> FilterByName(const std::vector<FileInfo>& files,
return filtered_entries;
}
bool SetAttributes(const std::filesystem::path& path, uint64_t attributes) {
return SetFileAttributes(path.c_str(), static_cast<DWORD>(attributes));
}
} // namespace filesystem
} // namespace xe