diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-09-12 00:42:59 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-09-17 16:35:45 +0200 |
commit | 9251f7e2f8dbb507f0846c680c6f2af155724e7a (patch) | |
tree | a546468995e6eb11d7d569f3e7df6c3fcf148e81 /src/core/file_sys/archive.h | |
parent | Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions. (diff) | |
download | yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.tar yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.tar.gz yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.tar.bz2 yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.tar.lz yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.tar.xz yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.tar.zst yuzu-9251f7e2f8dbb507f0846c680c6f2af155724e7a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/archive.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/file_sys/archive.h b/src/core/file_sys/archive.h index ac5630bea..67440ef58 100644 --- a/src/core/file_sys/archive.h +++ b/src/core/file_sys/archive.h @@ -4,7 +4,12 @@ #pragma once +#include <memory> + #include "common/common_types.h" +#include "common/bit_field.h" + +#include "core/file_sys/file.h" #include "core/hle/kernel/kernel.h" @@ -13,6 +18,13 @@ namespace FileSys { +union Mode { + u32 hex; + BitField<0, 1, u32> read_flag; + BitField<1, 1, u32> write_flag; + BitField<2, 1, u32> create_flag; +}; + class Archive : NonCopyable { public: /// Supported archive types @@ -36,6 +48,14 @@ public: virtual IdCode GetIdCode() 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 nullptr + */ + virtual std::unique_ptr<File> OpenFile(const std::string& path, const Mode mode) const = 0; + + /** * Read data from the archive * @param offset Offset in bytes to start reading data from * @param length Length in bytes of data to read from archive |