diff options
author | Nicola Mettifogo | 2008-10-08 09:05:21 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-10-08 09:05:21 +0000 |
commit | 5dd381932f3ed501a27fe97f48ef30331b2924d5 (patch) | |
tree | d026c2ab6cf25e0aab2687226bec31fd11fed0d5 /common | |
parent | 6a2f3dc0b984bcd8bd84d98ae456ed57fca740d6 (diff) | |
download | scummvm-rg350-5dd381932f3ed501a27fe97f48ef30331b2924d5.tar.gz scummvm-rg350-5dd381932f3ed501a27fe97f48ef30331b2924d5.tar.bz2 scummvm-rg350-5dd381932f3ed501a27fe97f48ef30331b2924d5.zip |
Added an optional depth parameter to FSDirectory::getSubDirectory(), so that returned FSDirectory can be more flexibly configured.
svn-id: r34756
Diffstat (limited to 'common')
-rw-r--r-- | common/archive.cpp | 4 | ||||
-rw-r--r-- | common/archive.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/common/archive.cpp b/common/archive.cpp index 40c2f01ee6..96ead55abd 100644 --- a/common/archive.cpp +++ b/common/archive.cpp @@ -156,13 +156,13 @@ SeekableReadStream *FSDirectory::openFile(const String &name) { return stream; } -FSDirectory *FSDirectory::getSubDirectory(const String &name) { +FSDirectory *FSDirectory::getSubDirectory(const String &name, int depth) { if (name.empty() || !_node.isDirectory()) { return 0; } FSNode node = lookupCache(_subDirCache, name); - return new FSDirectory(node); + return new FSDirectory(node, depth); } void FSDirectory::cacheDirectoryRecursive(FSNode node, int depth, const String& prefix) { diff --git a/common/archive.h b/common/archive.h index 2fc86b1b57..c8d22124fd 100644 --- a/common/archive.h +++ b/common/archive.h @@ -164,7 +164,7 @@ public: * Create a new FSDirectory pointing to a sub directory of the instance. * @return a new FSDirectory instance */ - FSDirectory *getSubDirectory(const String &name); + FSDirectory *getSubDirectory(const String &name, int depth = 1); virtual bool hasFile(const String &name); virtual int listMatchingMembers(ArchiveMemberList &list, const String &pattern); |