From 9251f7e2f8dbb507f0846c680c6f2af155724e7a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 12 Sep 2014 00:42:59 +0200 Subject: Core: Add a new File class, obtainable from an Archive, and a stub implementation. --- src/core/file_sys/archive_romfs.cpp | 11 +++++++++++ 1 file changed, 11 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 dc3fb1807..99ded4d8b 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/file_romfs.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // FileSys namespace @@ -21,6 +22,16 @@ Archive_RomFS::Archive_RomFS(const Loader::AppLoader& app_loader) { 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 Archive_RomFS::OpenFile(const std::string& path, const Mode mode) const { + return std::unique_ptr(new File_RomFS); +} + /** * Read data from the archive * @param offset Offset in bytes to start reading data from -- cgit v1.2.3