aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/filesystem/filesystem.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-09-15 20:13:26 -0700
committerGitHub <noreply@github.com>2021-09-15 20:13:26 -0700
commitf6d5444293d263c1a9afc0416e24a8b9262b519f (patch)
tree5bd81eb2caf3b094382bcc34388ac73af1165aa5 /src/core/hle/service/filesystem/filesystem.cpp
parente4d9814ec492b58559dedf4db622dc2dc74d9255 (diff)
parent8d63ebcb645476d8a1efca7957d8308e32b0353c (diff)
Merge pull request #7010 from Morph1984/fs-timestamp
vfs: Partially implement GetFileTimeStampRaw
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.cpp')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index c8d65f328..f8f9e32f7 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -261,6 +261,18 @@ ResultVal<FileSys::EntryType> VfsDirectoryServiceWrapper::GetEntryType(
return FileSys::ERROR_PATH_NOT_FOUND;
}
+ResultVal<FileSys::FileTimeStampRaw> VfsDirectoryServiceWrapper::GetFileTimeStampRaw(
+ const std::string& path) const {
+ auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
+ if (dir == nullptr) {
+ return FileSys::ERROR_PATH_NOT_FOUND;
+ }
+ if (GetEntryType(path).Failed()) {
+ return FileSys::ERROR_PATH_NOT_FOUND;
+ }
+ return MakeResult(dir->GetFileTimeStamp(Common::FS::GetFilename(path)));
+}
+
FileSystemController::FileSystemController(Core::System& system_) : system{system_} {}
FileSystemController::~FileSystemController() = default;