public static function path(string $url): string
    {
        // remove line feeds and trailing whitespaces and path separators
        $path = trim($url, " \t\r\n\0\x0B/\\");
        $path = substr($path, strlen(self::SCHEME . '://'));
        $path = str_replace('\\', '/', $path);
        // replace double slashes with single slashes
        $path = str_replace('//', '/', $path);
        return rawurldecode($path);
    }
public static function path(string $url): string
    {
        // remove line feeds and trailing whitespaces and path separators
        $path = trim($url, " \t\r\n\0\x0B/\\");
        $path = substr($path, strlen(self::SCHEME . '://'));
        $path = str_replace('\\', '/', $path);
        // replace double slashes with single slashes
        $path = str_replace('//', '/', $path);
        return rawurldecode($path);
    }
public static function path ( string $ url ) : string { // remove line feeds and trailing whitespaces and path separators $ path = trim ( $ url , " \t\r\n\0\x0B/\\" ) ; $ path = substr ( $ path , strlen ( self :: SCHEME . '://' ) ) ; $ path = str_replace ( '\\' , '/' , $ path ) ; // replace double slashes with single slashes $ path = str_replace ( '//' , '/' , $ path ) ; return rawurldecode ( $ path ) ; }
restores the path from the url

@param   string  $url  vfsStream url to translate into path
@return  string
restores the path from the url