MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / vaultRelativeFolderPath

Function vaultRelativeFolderPath

packages/app-core/src/lib/database-links.ts:20–27  ·  view source on GitHub ↗

Vault-relative path of a ` ` directory (mirrors the sidebar).

(
  folder: NoteFolder,
  subpath: string,
  vaultSettings: VaultSettings
)

Source from the content-addressed store, hash-verified

18
19/** Vault-relative path of a `<folder, subpath>` directory (mirrors the sidebar). */
20function vaultRelativeFolderPath(
21 folder: NoteFolder,
22 subpath: string,
23 vaultSettings: VaultSettings
24): string {
25 if (folder === 'inbox' && isPrimaryNotesAtRoot(vaultSettings)) return subpath
26 return subpath ? `${folder}/${subpath}` : folder
27}
28
29/**
30 * Every `.base` database in the vault, derived from the folder list (a database

Callers 1

listDatabaseLinkTargetsFunction · 0.70

Calls 1

isPrimaryNotesAtRootFunction · 0.90

Tested by

no test coverage detected