Skip to content

Tankōbon / main/db/path-roots / PathRoots

Class: PathRoots ​

Defined in: main/db/path-roots.ts:89

Converts a file path between what the database stores and the absolute path on this machine.

Implements ​

Constructors ​

Constructor ​

new PathRoots(store?): PathRoots

Defined in: main/db/path-roots.ts:92

Parameters ​

store? ​

RootsStore = ...

Returns ​

PathRoots

Methods ​

decode() ​

decode(stored): string

Defined in: main/db/path-roots.ts:120

The absolute path, on this machine, of a stored path.

Parameters ​

stored ​

string

Returns ​

string

Implementation of ​

PathCodec.decode


encode() ​

encode(filePath): string

Defined in: main/db/path-roots.ts:107

The form to store (and compare in SQL) for the absolute path filePath.

Parameters ​

filePath ​

string

Returns ​

string

Implementation of ​

PathCodec.encode


get() ​

get(id): string | undefined

Defined in: main/db/path-roots.ts:97

This machine's path of folder id, or undefined when it has none.

Parameters ​

id ​

string

Returns ​

string | undefined


set() ​

set(id, folderPath): void

Defined in: main/db/path-roots.ts:102

Says where folder id is on this machine, and remembers it.

Parameters ​

id ​

string

folderPath ​

string

Returns ​

void