Back to Pocketbase

Function rel

static/jsvm/functions/_filepath.rel.html

latest893 B
Original Source

Function rel

  • rel(basepath, targpath): string

Rel returns a relative path that is lexically equivalent to targpath when joined to basepath with an intervening separator. That is, [Join](basepath, Rel(basepath, targpath)) is equivalent to targpath itself. On success, the returned path will always be relative to basepath, even if basepath and targpath share no elements. An error is returned if targpath can't be made relative to basepath or if knowing the current working directory would be necessary to compute it. Rel calls [Clean] on the result.

Parameters

basepath: string
targpath: string

Returns string

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

Generated using TypeDoc