PersistentAI API Documentation / @persistentai/fireflow-vfs / path / isChildPath
Function: isChildPath()
isChildPath(
child,parent):boolean
Defined in: packages/fireflow-vfs/src/path/utils.ts:267
Check if a path is a child of another path.
Parameters
child
string
Potential child path
parent
string
Potential parent path
Returns
boolean
True if child is inside parent
Example
ts
isChildPath('/foo/bar', '/foo') // true
isChildPath('/foo', '/foo') // false (same path)
isChildPath('/foo', '/foo/bar') // false