diff options
Diffstat (limited to 'src/core/file_sys/archive_backend.h')
-rw-r--r-- | src/core/file_sys/archive_backend.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h index 390178f67..43a106549 100644 --- a/src/core/file_sys/archive_backend.h +++ b/src/core/file_sys/archive_backend.h @@ -181,20 +181,6 @@ public: } /** - * Tries to open the archive of this type with the specified path - * @param path Path to the archive - * @return ResultCode of the operation - */ - virtual ResultCode Open(const Path& path) = 0; - - /** - * Deletes the archive contents and then re-creates the base folder - * @param path Path to the archive - * @return ResultCode of the operation, 0 on success - */ - virtual ResultCode Format(const Path& path) const = 0; - - /** * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) */ virtual std::string GetName() const = 0; @@ -260,4 +246,29 @@ public: virtual std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const = 0; }; +class ArchiveFactory : NonCopyable { +public: + virtual ~ArchiveFactory() { + } + + /** + * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) + */ + virtual std::string GetName() const = 0; + + /** + * Tries to open the archive of this type with the specified path + * @param path Path to the archive + * @return An ArchiveBackend corresponding operating specified archive path. + */ + virtual ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) = 0; + + /** + * Deletes the archive contents and then re-creates the base folder + * @param path Path to the archive + * @return ResultCode of the operation, 0 on success + */ + virtual ResultCode Format(const Path& path) = 0; +}; + } // namespace FileSys |