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

Function deleteDatabase

apps/desktop/src/main/databases.ts:324–328  ·  view source on GitHub ↗
(root: string, csvRel: string)

Source from the content-addressed store, hash-verified

322 * (data.csv, schema.json, and the `pages/` record notes) in one shot.
323 */
324export async function deleteDatabase(root: string, csvRel: string): Promise<void> {
325 const formDir = formDirFromCsvPath(toPosix(csvRel))
326 if (!formDir) throw new Error(`Not a database folder: ${csvRel}`)
327 await fs.rm(databaseDataPath(root, formDir), { recursive: true, force: true })
328}
329
330/**
331 * Rename a database in place: rename its `<oldName>.base` folder to

Callers

nothing calls this directly

Calls 3

formDirFromCsvPathFunction · 0.90
databaseDataPathFunction · 0.90
toPosixFunction · 0.70

Tested by

no test coverage detected