src/System/Path.php
private static function addSegmentsToPath($path, $segments)
    {
        $segments = Arr::toArray($segments);
        if (count($segments) > 0) {
            $path .= '/' . implode('/', $segments);
        }
        return $path;
    }
private static function addSegmentsToPath($path, $segments)
    {
        $segments = Arr::toArray($segments);
        if (count($segments) > 0) {
            $path .= '/' . implode('/', $segments);
        }
        return $path;
    }
Add segments to path.

@param string $path
@param @param string|array $segments Dot notation is supported in string.
@return string