diff options
author | Max Horn | 2008-11-21 19:14:23 +0000 |
---|---|---|
committer | Max Horn | 2008-11-21 19:14:23 +0000 |
commit | 44d37a14a9bef80d2ca931298b8df1e508ffb94d (patch) | |
tree | 83fa7aac42cd0a1d6e355116e4c955513d7a3060 /common/fs.cpp | |
parent | 858de9b9382942a604b367baf1dae0b72855fde4 (diff) | |
download | scummvm-rg350-44d37a14a9bef80d2ca931298b8df1e508ffb94d.tar.gz scummvm-rg350-44d37a14a9bef80d2ca931298b8df1e508ffb94d.tar.bz2 scummvm-rg350-44d37a14a9bef80d2ca931298b8df1e508ffb94d.zip |
Removed FSNode::lookupFile
svn-id: r35142
Diffstat (limited to 'common/fs.cpp')
-rw-r--r-- | common/fs.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/common/fs.cpp b/common/fs.cpp index c1ef26e42d..497e961680 100644 --- a/common/fs.cpp +++ b/common/fs.cpp @@ -135,44 +135,6 @@ bool FSNode::isWritable() const { return _realNode->isWritable(); } -bool FSNode::lookupFile(FSList &results, const Common::String &p, bool hidden, bool exhaustive, int depth) const { - if (!isDirectory()) - return false; - - FSList children; - FSList subdirs; - Common::String pattern = p; - - pattern.toUppercase(); - - // First match all files on this level - getChildren(children, FSNode::kListAll, hidden); - for (FSList::iterator entry = children.begin(); entry != children.end(); ++entry) { - if (entry->isDirectory()) { - if (depth != 0) - subdirs.push_back(*entry); - } else { - Common::String filename = entry->getName(); - filename.toUppercase(); - if (filename.matchString(pattern)) { - results.push_back(*entry); - - if (!exhaustive) - return true; // Abort on first match if no exhaustive search was requested - } - } - } - - // Now scan all subdirs - for (FSList::iterator child = subdirs.begin(); child != subdirs.end(); ++child) { - child->lookupFile(results, pattern, hidden, exhaustive, depth - 1); - if (!exhaustive && !results.empty()) - return true; // Abort on first match if no exhaustive search was requested - } - - return !results.empty(); -} - Common::SeekableReadStream *FSNode::openForReading() const { if (_realNode == 0) return 0; |