public static function createFromUnixPath(string $uri = ''): self
    {
        $uri = implode('/', array_map('rawurlencode', explode('/', $uri)));
        if ('/' !== ($uri[0] ?? '')) {
            return Uri::createFromComponents(['path' => $uri]);
        }

        return Uri::createFromComponents(['path' => $uri, 'scheme' => 'file', 'host' => '']);
    }
public static function createFromUnixPath(string $uri = ''): self
    {
        $uri = implode('/', array_map('rawurlencode', explode('/', $uri)));
        if ('/' !== ($uri[0] ?? '')) {
            return Uri::createFromComponents(['path' => $uri]);
        }

        return Uri::createFromComponents(['path' => $uri, 'scheme' => 'file', 'host' => '']);
    }
public static function createFromUnixPath ( string $ uri = '' ) : self { $ uri = implode ( '/' , array_map ( 'rawurlencode' , explode ( '/' , $ uri ) ) ) ; if ( '/' !== ( $ uri [ 0 ] ?? '' ) ) { return Uri :: createFromComponents ( [ 'path' => $ uri ] ) ; } return Uri :: createFromComponents ( [ 'path' => $ uri , 'scheme' => 'file' , 'host' => '' ] ) ; }
Create a new instance from a Unix path string.
Create a new instance from a Unix path string .