Airship\Cabin\Bridge\Landing\Proto\FileManager::getPath PHP Method

getPath() protected method

Given a string (and a predetermined current root directory), get a sequence of folder names to determine the current path
protected getPath ( string $path ) : array
$path string
return array
    protected function getPath(string $path) : array
    {
        if (empty($this->root_dir)) {
            if (empty($path)) {
                return [];
            }
            return \Airship\chunk($path, '/');
        }
        $split = \Airship\chunk($path, '/');
        $base = \Airship\chunk($this->root_dir, '/');
        foreach ($split as $piece) {
            if (!empty($piece)) {
                $base[] = $piece;
            }
        }
        return $base;
    }