Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FindClosestPath

When for a given URL fragment there are more matches, finds the colsest one.

see

UrlToDirective

Hierarchy

  • FindClosestPath

Index

Constructors

constructor

  • new FindClosestPath(currentFileFullPath: string, pathsFound: Array<string>): FindClosestPath

Properties

Private closest

closest: string

The final closest URL.

Private closestListBySlashesNumber

closestListBySlashesNumber: Array<string> = []

List of all the URLs with the same distance from the origin URL.

Private currentFileFullPath

currentFileFullPath: string

full path to the file where the UrlTo directive has been invoked.

Private currentLowestSlashes

currentLowestSlashes: number

The lowest number of slashes found separating the matches for the URL fragment to the origin URL.

Private pathsFound

pathsFound: Array<string>

Array with the list of all the matches.

Private separator

separator: "/" | "\"

The path separator used by the OS.

Methods

find

  • find(): string

Private goupBySlashes

  • goupBySlashes(): void

Private normalizeCurrentFileFullPath

  • normalizeCurrentFileFullPath(): void

Private pickFromEqualDistance

  • pickFromEqualDistance(): void

Private setSeparator

  • setSeparator(): void