PersistentAI API Documentation / @persistentai/fireflow-vfs / path / relativePath
Function: relativePath()
relativePath(
target,base):string
Defined in: packages/fireflow-vfs/src/path/utils.ts:284
Get the relative path from base to target.
Parameters
target
string
Target path
base
string
Base path
Returns
string
Relative path from base to target
Throws
Error if target is not relative to base
Example
ts
relativePath('/foo/bar/baz', '/foo') // 'bar/baz'