Skip to content

containsPath

function containsPath(root, target): boolean;

Lexical containment: does target sit at or under root, by path string alone?

Correct for a path that has not been created yet — an MCP cwd of ${PLUGIN_DATA} is a declaration, and the directory only exists later. Use containsResolvedPath for a path you are about to read.

Parameter Type

root

string

target

string

boolean