concrete/src/Tree/Node/Type/FileFolder.php
public function getChildFolderByPath(array $names, $create = false)
    {
        if (count($names) === 0) {
            $result = $this;
        } else {
            $childName = array_shift($names);
            $result = $this->getChildFolderByName($childName, $create);
            if ($result !== null) {
                $result = $result->getChildFolderByPath($names, $create);
            }
        }

        return $result;
    }
public function getChildFolderByPath(array $names, $create = false)
    {
        if (count($names) === 0) {
            $result = $this;
        } else {
            $childName = array_shift($names);
            $result = $this->getChildFolderByName($childName, $create);
            if ($result !== null) {
                $result = $result->getChildFolderByPath($names, $create);
            }
        }

        return $result;
    }
public function getChildFolderByPath ( array $ names , $ create = false ) { if ( count ( $ names ) === 0 ) { $ result = $ this ; } else { $ childName = array_shift ( $ names ) ; $ result = $ this -> getChildFolderByName ( $ childName , $ create ) ; if ( $ result !== null ) { $ result = $ result -> getChildFolderByPath ( $ names , $ create ) ; } } return $ result ; }
Get a descendent folder of this folder given its path.

@param array $names The names of the child folders (1st item: child folder, 2nd item: grand-child folder, ...)
@param bool $create Should the descendent folders be created if they don't exist?

@return static|null return NULL if the descendent folder has not been found and $create is false
Get a descendent folder of this folder given its path .