Function segmentFilePath

The file of a segment's database: the segment goes between the file's name and its extension (/data/app.sqlite3 and segment agentos give /data/app-agentos.sqlite3), or after a name with no extension. A file: URI keeps its query, and SQLite's in-memory names (:memory:, file::memory:) stay as they are, since each in-memory connection is a database of its own. Without a segment the path is returned as it is.

When the segment is not one a segment name can take.

  • Parameters

    • filePath: string
    • segment: undefined | string

    Returns string