public static function join($paths)
    {
        $joins = array_map('strval', is_array($paths) ? $paths : func_get_args());
        $parts = self::getParts($joins);
        $absolute = self::isAbsolute($joins[0]);
        $root = $absolute ? array_shift($parts) . DIRECTORY_SEPARATOR : '';
        $parts = self::resolve($parts, $absolute);

        return self::buildPath($root, $parts);
    }