Skip to content

PersistentAI API Documentation / @persistentai/fireflow-vfs / / extractPath

Function: extractPath()

extractPath(uri): string

Defined in: packages/fireflow-vfs/src/utils/uri.ts:40

Extract path from a ff:// URI

Parameters

uri

string

The ff:// URI string

Returns

string

The path portion of the URI

Throws

Error if the URI is invalid

Example

ts
extractPath('ff://docs/readme.md') // 'docs/readme.md'
extractPath('ff:///') // ''
extractPath('ff://folder/') // 'folder/'

Licensed under BUSL-1.1