private static function resolveParent(array & $parts, $absolute)
    {
        $count = count($parts);

        if ($absolute || ($count > 0 && $parts[$count - 1] !== '..')) {
            array_pop($parts);
            return;
        }

        $parts[] = '..';
    }