Newscoop\Service\Implementation\ThemeServiceLocalFileSystem::extractRelativePathFrom PHP Method

extractRelativePathFrom() protected method

Extracts from a provided file path the path where that file is located, attention the path needs to be in the escaped form.
protected extractRelativePathFrom ( string $path ) : string
$path string The path from which to extract the relative path, *(not null not empty).
return string The relative path for the provided path, not null.
    protected function extractRelativePathFrom($path)
    {
        $pos = strrpos($path, '/');
        if ($pos !== false) {
            return substr($path, 0, $pos + 1);
        }
        return '';
    }