Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "util/PathUtil"

Index

Functions

Const decodeUriPathComponents

  • decodeUriPathComponents(path: string): string

Const encodeUriPathComponents

  • encodeUriPathComponents(path: string): string
  • Encodes all (non-slash) special characters in a URI path.

    Parameters

    • path: string

    Returns string

Const ensureTrailingSlash

  • ensureTrailingSlash(path: string): string
  • Makes sure the input path has exactly 1 slash at the end. Multiple slashes will get merged into one. If there is no slash it will be added.

    Parameters

    • path: string

      Path to check.

    Returns string

    The potentially changed path.

Const isContainerIdentifier

Const isContainerPath

  • isContainerPath(path: string): boolean
  • Checks if the path corresponds to a container path (ending in a /).

    Parameters

    • path: string

      Path to check.

    Returns boolean

Const toCanonicalUriPath

  • toCanonicalUriPath(path: string): string
  • Converts a URI path to the canonical version by splitting on slashes, decoding any percent-based encodings, and then encoding any special characters.

    Parameters

    • path: string

    Returns string

Const trimTrailingSlashes

  • trimTrailingSlashes(path: string): string
  • Makes sure the input path has no slashes at the end.

    Parameters

    • path: string

      Path to check.

    Returns string

    The potentially changed path.