public static function normalize(string $path) : string
    {
        if (strpos($path, 'data://') === 0) {
            return $path;
        }


        $path = self::stringReplaceIgnoringStreamWrapper(['\\', '/'], DIRECTORY_SEPARATOR, $path);

        $startOfPath = strpos($path, '://') === false ? 0 : strpos($path, '://') + strlen('://');

        while (strpos($path, DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, $startOfPath) !== false) {
            $path = self::stringReplaceIgnoringStreamWrapper(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path);
        }

        return $path;
    }