Logo Search packages:      
Sourcecode: scummvm version File versions

ArchiveMemberPtr Common::FSDirectory::getMember ( const String name  )  [virtual]

Get a ArchiveMember representation of the specified file. A full match of relative path and filename is needed for success.

Implements Common::Archive.

Definition at line 122 of file archive.cpp.

References Common::String::empty(), Common::FSNode::exists(), and Common::FSNode::isDirectory().

      if (name.empty() || !_node.isDirectory())
            return ArchiveMemberPtr();

      FSNode node = lookupCache(_fileCache, name);

      if (!node.exists()) {
            warning("FSDirectory::getMember: FSNode does not exist");
            return ArchiveMemberPtr();
      } else if (node.isDirectory()) {
            warning("FSDirectory::getMember: FSNode is a directory");
            return ArchiveMemberPtr();

      return ArchiveMemberPtr(new FSNode(node));

Generated by  Doxygen 1.6.0   Back to index