Logo Search packages:      
Sourcecode: scummvm version File versions

int Common::FSDirectory::listMembers ( ArchiveMemberList list  )  [virtual]

Returns a list of all the files in the cache.

Implements Common::Archive.

Definition at line 285 of file archive.cpp.

References Common::HashMap< Key, Val, HashFunc, EqualFunc >::begin(), Common::HashMap< Key, Val, HashFunc, EqualFunc >::end(), Common::FSNode::isDirectory(), and Common::List< t_T >::push_back().

                                                    {
      if (!_node.isDirectory())
            return 0;

      // Cache dir data
      ensureCached();

      int files = 0;
      for (NodeCache::iterator it = _fileCache.begin(); it != _fileCache.end(); ++it) {
            list.push_back(ArchiveMemberPtr(new FSNode(it->_value)));
            ++files;
      }

      return files;
}


Generated by  Doxygen 1.6.0   Back to index