Skip to content

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

Function: toUri()

toUri(pathOrUri): string

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

Convert a plain path to a ff:// URI Convenience function that handles both paths and URIs

Parameters

pathOrUri

string

Either a plain path or existing ff:// URI

Returns

string

Proper ff:// URI

Example

ts
toUri('docs/readme.md') // 'ff://docs/readme.md'
toUri('ff://docs/readme.md') // 'ff://docs/readme.md'

Licensed under BUSL-1.1