function DrupalFinder::shiftPathUp
Returns parent directory.
Parameters
string: Path to start from
Return value
string|false Parent path of given path or false when $path is filesystem root
1 call to DrupalFinder::shiftPathUp()
- DrupalFinder::discoverRoots in vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php - Discover all valid paths.
File
-
vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php, line 297
Class
Namespace
DrupalFinderCode
private function shiftPathUp($path) {
$parent = dirname($path);
return in_array($parent, [
'.',
$path,
]) ? false : $parent;
}