diff options
author | bunnei <bunneidev@gmail.com> | 2014-09-19 04:27:06 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-09-19 04:27:06 +0200 |
commit | a9630a9d2b432bea7bdfef4aa462035b98b34517 (patch) | |
tree | 258010943e989fc61a2a439ff15ead7ed3d11a6f /src/core/file_sys/archive_romfs.cpp | |
parent | Merge pull request #107 from lioncash/sprintf (diff) | |
parent | Kernel: Implement the Close command for Archive, File and Directory. (diff) | |
download | yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.tar yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.tar.gz yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.tar.bz2 yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.tar.lz yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.tar.xz yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.tar.zst yuzu-a9630a9d2b432bea7bdfef4aa462035b98b34517.zip |
Diffstat (limited to 'src/core/file_sys/archive_romfs.cpp')
-rw-r--r-- | src/core/file_sys/archive_romfs.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/file_sys/archive_romfs.cpp b/src/core/file_sys/archive_romfs.cpp index dc3fb1807..9bab3471f 100644 --- a/src/core/file_sys/archive_romfs.cpp +++ b/src/core/file_sys/archive_romfs.cpp @@ -5,6 +5,8 @@ #include "common/common_types.h" #include "core/file_sys/archive_romfs.h" +#include "core/file_sys/directory_romfs.h" +#include "core/file_sys/file_romfs.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // FileSys namespace @@ -22,6 +24,25 @@ Archive_RomFS::~Archive_RomFS() { } /** + * 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 + */ +std::unique_ptr<File> Archive_RomFS::OpenFile(const std::string& path, const Mode mode) const { + return std::unique_ptr<File>(new File_RomFS); +} + +/** + * Open a directory specified by its path + * @param path Path relative to the archive + * @return Opened directory, or nullptr + */ +std::unique_ptr<Directory> Archive_RomFS::OpenDirectory(const std::string& path) const { + return std::unique_ptr<Directory>(new Directory_RomFS); +} + +/** * 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 |