Interface PathRoute

A route representing a path to file or directory.

Hierarchy

Properties

Methods

Properties

dir: boolean

Whether this is a route to directory.

path: readonly PathEntry[]

A path split onto file and directory entries.

Methods

  • Extracts a section of this route between the given entry indices.

    Parameters

    • fromEntry: number

      Zero-based index at which to start extraction. A negative index is treated as zero.

    • Optional toEntry: number

      Zero-based index before which to end extraction. A value greater than the path length is treated as equal to path length. If this value is less than from, an empty route is returned.

    Returns PathRoute

    Either a route section, or this route if section has the same length.

  • Builds a string representation of the route path.

    Returns string

    URL-encoded pathname without leading / and extra parts. E.g. without search parameters.

  • Builds a string representation of this route.

    Returns string

    URL-encoded pathname without leading /.

Generated using TypeDoc