summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/archive_backend.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-20 04:08:21 +0100
committerbunnei <bunneidev@gmail.com>2018-01-21 21:39:20 +0100
commit7988f0248959b2284ce5cc74bac6aef897627a8e (patch)
tree387359a2a624e6616a3545c11ffbb100fe387900 /src/core/file_sys/archive_backend.h
parentfile_sys: Repurpose 3DS IVFC code for Switch ROMFS. (diff)
downloadyuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.tar
yuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.tar.gz
yuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.tar.bz2
yuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.tar.lz
yuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.tar.xz
yuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.tar.zst
yuzu-7988f0248959b2284ce5cc74bac6aef897627a8e.zip
Diffstat (limited to 'src/core/file_sys/archive_backend.h')
-rw-r--r--src/core/file_sys/archive_backend.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h
index 58f6c150c..2255bee42 100644
--- a/src/core/file_sys/archive_backend.h
+++ b/src/core/file_sys/archive_backend.h
@@ -81,13 +81,12 @@ public:
virtual std::string GetName() const = 0;
/**
- * Open a file specified by its path, using the specified mode
- * @param path Path relative to the archive
- * @param mode Mode to open the file with
- * @return Opened file, or error code
+ * Create a file specified by its path
+ * @param path Path relative to the Archive
+ * @param size The size of the new file, filled with zeroes
+ * @return Result of the operation
*/
- virtual ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path,
- const Mode& mode) const = 0;
+ virtual ResultCode CreateFile(const Path& path, u64 size) const = 0;
/**
* Delete a file specified by its path
@@ -97,12 +96,11 @@ public:
virtual ResultCode DeleteFile(const Path& path) const = 0;
/**
- * Rename a File specified by its path
- * @param src_path Source path relative to the archive
- * @param dest_path Destination path relative to the archive
+ * Create a directory specified by its path
+ * @param path Path relative to the archive
* @return Result of the operation
*/
- virtual ResultCode RenameFile(const Path& src_path, const Path& dest_path) const = 0;
+ virtual ResultCode CreateDirectory(const Path& path) const = 0;
/**
* Delete a directory specified by its path
@@ -119,19 +117,12 @@ public:
virtual ResultCode DeleteDirectoryRecursively(const Path& path) const = 0;
/**
- * Create a file specified by its path
- * @param path Path relative to the Archive
- * @param size The size of the new file, filled with zeroes
- * @return Result of the operation
- */
- virtual ResultCode CreateFile(const Path& path, u64 size) const = 0;
-
- /**
- * Create a directory specified by its path
- * @param path Path relative to the archive
+ * Rename a File specified by its path
+ * @param src_path Source path relative to the archive
+ * @param dest_path Destination path relative to the archive
* @return Result of the operation
*/
- virtual ResultCode CreateDirectory(const Path& path) const = 0;
+ virtual ResultCode RenameFile(const Path& src_path, const Path& dest_path) const = 0;
/**
* Rename a Directory specified by its path
@@ -142,6 +133,15 @@ public:
virtual ResultCode RenameDirectory(const Path& src_path, const Path& dest_path) const = 0;
/**
+ * Open a file specified by its path, using the specified mode
+ * @param path Path relative to the archive
+ * @param mode Mode to open the file with
+ * @return Opened file, or error code
+ */
+ virtual ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path,
+ const Mode& mode) const = 0;
+
+ /**
* Open a directory specified by its path
* @param path Path relative to the archive
* @return Opened directory, or error code
@@ -152,7 +152,7 @@ public:
* Get the free space
* @return The number of free bytes in the archive
*/
- virtual u64 GetFreeBytes() const = 0;
+ virtual u64 GetFreeSpaceSize() const = 0;
};
class ArchiveFactory : NonCopyable {