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

Function folderRoot

apps/desktop/src/mcp/vault-ops.ts:144–148  ·  view source on GitHub ↗

The absolute directory that holds notes for a given top-level * folder, taking the vault's primaryNotesLocation into account.

(root: string, folder: NoteFolder)

Source from the content-addressed store, hash-verified

142/** The absolute directory that holds notes for a given top-level
143 * folder, taking the vault's primaryNotesLocation into account. */
144async function folderRoot(root: string, folder: NoteFolder): Promise<string> {
145 if (folder !== 'inbox') return path.join(root, folder)
146 const primary = await readPrimaryNotesLocation(root)
147 return primary === 'root' ? root : path.join(root, 'inbox')
148}
149
150const FENCE_LINE_RE = /^(\s{0,3})(`{3,}|~{3,})/
151const TASK_LINE_RE = /^\s*[-*+]\s+\[([ xX])\](.*)$/

Callers 10

listNotesFunction · 0.70
listFoldersFunction · 0.70
createNoteFunction · 0.70
folderSubpathOfFunction · 0.70
moveBetweenFoldersFunction · 0.70
moveNoteFunction · 0.70
createFolderFunction · 0.70
renameFolderFunction · 0.70
deleteFolderFunction · 0.70
searchTextFunction · 0.70

Calls 1

readPrimaryNotesLocationFunction · 0.85

Tested by

no test coverage detected