summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/savedata_archive.h
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2016-10-17 08:54:48 +0200
committerwwylele <wwylele@gmail.com>2016-11-19 16:17:19 +0100
commit7166fdc49072d987d04e681de4d9e1558ba75c63 (patch)
treeb65665c71cc0fb5dfff8ba64d1a64898ec8571fd /src/core/file_sys/savedata_archive.h
parentFileSys: remove Open from FileBackend (diff)
downloadyuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.tar
yuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.tar.gz
yuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.tar.bz2
yuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.tar.lz
yuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.tar.xz
yuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.tar.zst
yuzu-7166fdc49072d987d04e681de4d9e1558ba75c63.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/savedata_archive.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/core/file_sys/savedata_archive.h b/src/core/file_sys/savedata_archive.h
new file mode 100644
index 000000000..2fb6c452a
--- /dev/null
+++ b/src/core/file_sys/savedata_archive.h
@@ -0,0 +1,43 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <string>
+#include "core/file_sys/archive_backend.h"
+#include "core/file_sys/directory_backend.h"
+#include "core/file_sys/file_backend.h"
+#include "core/hle/result.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// FileSys namespace
+
+namespace FileSys {
+
+/// Archive backend for general save data archive type (SaveData and SystemSaveData)
+class SaveDataArchive : public ArchiveBackend {
+public:
+ SaveDataArchive(const std::string& mount_point_) : mount_point(mount_point_) {}
+
+ std::string GetName() const override {
+ return "SaveDataArchive: " + 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:
+ std::string mount_point;
+};
+
+} // namespace FileSys