diff options
author | Liam <byteslice@airmail.cc> | 2023-06-16 21:12:46 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-06-16 22:29:06 +0200 |
commit | 734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc (patch) | |
tree | ede803c6cfca7ccc0bc258e3b784766a676ff61d /src/core/file_sys/vfs_real.h | |
parent | Merge pull request #10801 from 8bitDream/fix_aspect (diff) | |
download | yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.tar yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.tar.gz yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.tar.bz2 yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.tar.lz yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.tar.xz yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.tar.zst yuzu-734242c5bcd56dbd7fc69fb49dba5b7d5ca090bc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/vfs_real.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/file_sys/vfs_real.h b/src/core/file_sys/vfs_real.h index d8c900e33..67f4c4422 100644 --- a/src/core/file_sys/vfs_real.h +++ b/src/core/file_sys/vfs_real.h @@ -4,6 +4,7 @@ #pragma once #include <map> +#include <optional> #include <string_view> #include "common/intrusive_list.h" #include "core/file_sys/mode.h" @@ -20,6 +21,8 @@ struct FileReference : public Common::IntrusiveListBaseNode<FileReference> { }; class RealVfsFile; +class RealVfsDirectory; + class RealVfsFilesystem : public VfsFilesystem { public: RealVfsFilesystem(); @@ -56,6 +59,11 @@ private: private: void InsertReferenceIntoList(FileReference& reference); void RemoveReferenceFromList(FileReference& reference); + +private: + friend class RealVfsDirectory; + VirtualFile OpenFileFromEntry(std::string_view path, std::optional<u64> size, + Mode perms = Mode::Read); }; // An implementation of VfsFile that represents a file on the user's computer. @@ -78,13 +86,14 @@ public: private: RealVfsFile(RealVfsFilesystem& base, std::unique_ptr<FileReference> reference, - const std::string& path, Mode perms = Mode::Read); + const std::string& path, Mode perms = Mode::Read, std::optional<u64> size = {}); RealVfsFilesystem& base; std::unique_ptr<FileReference> reference; std::string path; std::string parent_path; std::vector<std::string> path_components; + std::optional<u64> size; Mode perms; }; |