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

Function deleteFolder

apps/desktop/src/mcp/vault-ops.ts:778–788  ·  view source on GitHub ↗
(
  root: string,
  topFolder: NoteFolder,
  subpath: string
)

Source from the content-addressed store, hash-verified

776}
777
778export async function deleteFolder(
779 root: string,
780 topFolder: NoteFolder,
781 subpath: string
782): Promise<void> {
783 const clean = subpath.replace(/^\/+|\/+$/g, '')
784 if (!clean) throw new Error('Cannot delete the top-level folder')
785 const folderAbs = await folderRoot(root, topFolder)
786 const abs = resolveSafe(folderAbs, clean)
787 await fs.rm(abs, { recursive: true, force: true })
788}
789
790/* ---------- Text search ---------------------------------------------- */
791

Callers 1

server.tsFile · 0.70

Calls 2

folderRootFunction · 0.70
resolveSafeFunction · 0.70

Tested by

no test coverage detected