contains
@forge/monorepo / backend/src / contains
Function: contains()
contains(
root,candidate):boolean
Defined in: backend/src/toolkit/files.ts:125
Is candidate inside root, both already real paths?
relative rather than startsWith: /srv/data-secrets starts with /srv/data, and a prefix comparison would
accept it. A relative path that begins with .. or is absolute is outside.
Parameters
root
string
candidate
string
Returns
boolean