From c14e5713f52cd58f2a8206d844448a8c2d1a54b6 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 12 Sep 2014 00:47:05 +0200 Subject: Core: Add a method to obtain a Directory from an Archive. --- src/core/file_sys/archive_romfs.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/file_sys/archive_romfs.cpp') diff --git a/src/core/file_sys/archive_romfs.cpp b/src/core/file_sys/archive_romfs.cpp index 99ded4d8b..9bab3471f 100644 --- a/src/core/file_sys/archive_romfs.cpp +++ b/src/core/file_sys/archive_romfs.cpp @@ -5,6 +5,7 @@ #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" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -32,6 +33,15 @@ std::unique_ptr Archive_RomFS::OpenFile(const std::string& path, const Mod return std::unique_ptr(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 Archive_RomFS::OpenDirectory(const std::string& path) const { + return std::unique_ptr(new Directory_RomFS); +} + /** * Read data from the archive * @param offset Offset in bytes to start reading data from -- cgit v1.2.3