private static function buildPath($root, array $parts)
    {
        if ($parts === []) {
            return $root === '' ? '.' : $root;
        }

        return $root . implode(DIRECTORY_SEPARATOR, $parts);
    }
private static function buildPath($root, array $parts)
    {
        if ($parts === []) {
            return $root === '' ? '.' : $root;
        }

        return $root . implode(DIRECTORY_SEPARATOR, $parts);
    }
private static function buildPath ( $ root , array $ parts ) { if ( $ parts === [ ] ) { return $ root === '' ? '.' : $ root ; } return $ root . implode ( DIRECTORY_SEPARATOR , $ parts ) ; }
Builds the final path from the root and path parts.
@param string $root Root path
@param string[] $parts The path parts
@return string The final built path
Builds the final path from the root and path parts .