src/Finder.php
public function normalizePath($path)
	{
		$path = rtrim($path, '/\\').DIRECTORY_SEPARATOR;
		$path = realpath($path).DIRECTORY_SEPARATOR;

		if ($this->root and strpos($path, $this->root) !== 0)
		{
			throw new \Exception('Cannot access path outside: '.$this->root.'. Trying to access: '.$path);
		}

		return $path;
	}
public function normalizePath($path)
	{
		$path = rtrim($path, '/\\').DIRECTORY_SEPARATOR;
		$path = realpath($path).DIRECTORY_SEPARATOR;

		if ($this->root and strpos($path, $this->root) !== 0)
		{
			throw new \Exception('Cannot access path outside: '.$this->root.'. Trying to access: '.$path);
		}

		return $path;
	}
public function normalizePath ( $ path ) { $ path = rtrim ( $ path , '/\\' ) . DIRECTORY_SEPARATOR ; $ path = realpath ( $ path ) . DIRECTORY_SEPARATOR ; if ( $ this -> root and strpos ( $ path , $ this -> root ) !== 0 ) { throw new \ Exception ( 'Cannot access path outside: ' . $ this -> root . '. Trying to access: ' . $ path ) ; } return $ path ; }
Normalizes a path

@param string $path

@return string

@throws \Exception
Normalizes a path