mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
Added an optional depth parameter to FSDirectory::getSubDirectory(), so that returned FSDirectory can be more flexibly configured.
svn-id: r34756
This commit is contained in:
parent
6a2f3dc0b9
commit
5dd381932f
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user