• This function is used in the process of converting a file path to a URI. Encodes all (non-slash) special characters in a URI path, with the exception of encoded slash characters, as this would lead to unnecessary double encoding, resulting in a URI that differs from the expected result.

    Returns

    An encoded copy of the provided URI path (ignoring encoded slash characters).

    Parameters

    • path: string

      The path to encode the URI path components of.

    Returns string