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.