diff options
author | Sebastian Valle <subv2112@gmail.com> | 2016-11-28 00:56:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-28 00:56:56 +0100 |
commit | 4ba5acdaff19f5334b86e86c324763d4e9b969b0 (patch) | |
tree | 408343a46858bcde292744d89fc6b3dadd9a54b0 /src/core/file_sys/archive_sdmc.h | |
parent | Merge pull request #2218 from Subv/stencil_lines (diff) | |
parent | tests: add a work-around for macOS linking error (diff) | |
download | yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.tar yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.tar.gz yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.tar.bz2 yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.tar.lz yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.tar.xz yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.tar.zst yuzu-4ba5acdaff19f5334b86e86c324763d4e9b969b0.zip |
Diffstat (limited to 'src/core/file_sys/archive_sdmc.h')
-rw-r--r-- | src/core/file_sys/archive_sdmc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/file_sys/archive_sdmc.h b/src/core/file_sys/archive_sdmc.h index 88e855351..9d99b110c 100644 --- a/src/core/file_sys/archive_sdmc.h +++ b/src/core/file_sys/archive_sdmc.h @@ -14,6 +14,32 @@ namespace FileSys { +/// Archive backend for SDMC archive +class SDMCArchive : public ArchiveBackend { +public: + SDMCArchive(const std::string& mount_point_) : mount_point(mount_point_) {} + + std::string GetName() const override { + return "SDMCArchive: " + mount_point; + } + + ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path, + const Mode& mode) const override; + ResultCode DeleteFile(const Path& path) const override; + ResultCode RenameFile(const Path& src_path, const Path& dest_path) const override; + ResultCode DeleteDirectory(const Path& path) const override; + ResultCode DeleteDirectoryRecursively(const Path& path) const override; + ResultCode CreateFile(const Path& path, u64 size) const override; + ResultCode CreateDirectory(const Path& path) const override; + ResultCode RenameDirectory(const Path& src_path, const Path& dest_path) const override; + ResultVal<std::unique_ptr<DirectoryBackend>> OpenDirectory(const Path& path) const override; + u64 GetFreeBytes() const override; + +protected: + ResultVal<std::unique_ptr<FileBackend>> OpenFileBase(const Path& path, const Mode& mode) const; + std::string mount_point; +}; + /// File system interface to the SDMC archive class ArchiveFactory_SDMC final : public ArchiveFactory { public: |