diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-09-12 00:47:05 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-09-17 16:35:46 +0200 |
commit | c14e5713f52cd58f2a8206d844448a8c2d1a54b6 (patch) | |
tree | 00b089a33c950107ad161a36b1c17808a85eef88 /src/core/file_sys/archive_sdmc.cpp | |
parent | Core: Add a Directory object, with both a stub and a passthrough implementations. (diff) | |
download | yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.tar yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.tar.gz yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.tar.bz2 yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.tar.lz yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.tar.xz yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.tar.zst yuzu-c14e5713f52cd58f2a8206d844448a8c2d1a54b6.zip |
Diffstat (limited to 'src/core/file_sys/archive_sdmc.cpp')
-rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index fb155430d..30d33be5f 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp @@ -8,6 +8,7 @@ #include "common/file_util.h" #include "core/file_sys/archive_sdmc.h" +#include "core/file_sys/directory_sdmc.h" #include "core/file_sys/file_sdmc.h" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -45,6 +46,17 @@ std::unique_ptr<File> Archive_SDMC::OpenFile(const std::string& path, const Mode } /** + * Open a directory specified by its path + * @param path Path relative to the archive + * @return Opened directory, or nullptr + */ +std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const std::string& path) const { + DEBUG_LOG(FILESYS, "called path=%s", path.c_str()); + Directory_SDMC* directory = new Directory_SDMC(this, path); + return std::unique_ptr<Directory>(directory); +} + +/** * Read data from the archive * @param offset Offset in bytes to start reading archive from * @param length Length in bytes to read data from archive |