public function normalizePath(string $path, int $options = self::MODE_DEFAULT): string
    {
        $this->validateOptions($options);
        $pathInfo = $this->getPathInfo();
        $pathInfo->initAll($path);
        $this->checkWrappers($options);
        $this->absoluteChecks($options);
        $path = '';
        if ($pathInfo->hasWrappers()) {
            $path .= \implode('://', $pathInfo->getWrapperList()) . '://';
        }
        $path .= $pathInfo->getRoot() . \implode('/', $this->cleanPartsPath()) . '/';
        return $path;
    }
public function normalizePath(string $path, int $options = self::MODE_DEFAULT): string
    {
        $this->validateOptions($options);
        $pathInfo = $this->getPathInfo();
        $pathInfo->initAll($path);
        $this->checkWrappers($options);
        $this->absoluteChecks($options);
        $path = '';
        if ($pathInfo->hasWrappers()) {
            $path .= \implode('://', $pathInfo->getWrapperList()) . '://';
        }
        $path .= $pathInfo->getRoot() . \implode('/', $this->cleanPartsPath()) . '/';
        return $path;
    }
public function normalizePath ( string $ path , int $ options = self :: MODE_DEFAULT ) : string { $ this -> validateOptions ( $ options ) ; $ pathInfo = $ this -> getPathInfo ( ) ; $ pathInfo -> initAll ( $ path ) ; $ this -> checkWrappers ( $ options ) ; $ this -> absoluteChecks ( $ options ) ; $ path = '' ; if ( $ pathInfo -> hasWrappers ( ) ) { $ path .= \ implode ( '://' , $ pathInfo -> getWrapperList ( ) ) . '://' ; } $ path .= $ pathInfo -> getRoot ( ) . \ implode ( '/' , $ this -> cleanPartsPath ( ) ) . '/' ; return $ path ; }
Used to normalize a file path without all the shortcomings of the
built-in functions.

This should NOT be used with a string that includes a file name, instead
use NormalizeFile() when wanting to check both.

Note that path length is not checked since the OS, character set used,
and/or filesystem being used can change what is allowed.

@param string $path      Path to be normalized.
@param int    $options   Determines the options FPN uses while
validating path.

@see   FilePathNormalizerInterface::normalizeFile() Use to normalize full
path with a file name.
@return string Returns the normalized path.
@throws \DomainException
@since 0.2.0-dev Added to making using class easier.
@api
Used to normalize a file path without all the shortcomings of the built - in functions .