Logo Search packages:      
Sourcecode: scummvm version File versions

virtual AbstractFSNode* POSIXFilesystemNode::getChild ( const Common::String name ) const [virtual]

Returns the child node with the given name. When called on a non-directory node, it should handle this gracefully by returning 0. When called with a name not matching any of the files/dirs contained in this directory, a valid node should be returned, which returns 'false' upon calling the exists() method. The idea is that this node can then still can be used to create a new file via the createWriteStream() method.

Example: Calling getChild() for a node with path "/foo/bar" using name="file.txt", would produce a new node with "/foo/bar/file.txt" as path.

Note:
Handling calls on non-dir nodes gracefully makes it possible to switch to a lazy type detection scheme in the future.
Parameters:
nameString containing the name of the child to create a new node.

Implements AbstractFSNode.


Generated by  Doxygen 1.6.0   Back to index