Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

AbstractFSNode * Ps2FilesystemNode::getParent (  )  const [virtual]

The parent node of this directory. The parent of the root is the root itself.

Implements AbstractFSNode.

Definition at line 471 of file ps2-fs.cpp.

References Ps2FilesystemNode().

                                                   {
      // printf("Ps2FilesystemNode::getParent : path = %s\n", _path.c_str());

      if (_isRoot)
            return new Ps2FilesystemNode(this); // FIXME : 0 ???

      if (_path.lastChar() == ':') // devs
            return new Ps2FilesystemNode(); // N: default is root

      const char *start = _path.c_str();
      const char *end = _lastPathComponent(_path);

      Common::String str(start, end - start);
      // printf("  parent = %s\n", str.c_str());

      return new Ps2FilesystemNode(str, true);
}


Generated by  Doxygen 1.6.0   Back to index