MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / deleteDocument

Function deleteDocument

projects/openade-module/src/nodeYjsStorage.ts:217–221  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

215 readDocumentUpdate: readUpdate,
216 saveDocumentUpdate: saveUpdate,
217 async deleteDocument(id) {
218 await fs.unlink(docPath(id)).catch((error) => {
219 if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error
220 })
221 },
222 async readDocumentBase64(id) {
223 const data = await readUpdate(id)
224 return data ? { id, data: Buffer.from(data).toString("base64") } : null

Callers

nothing calls this directly

Calls 1

docPathFunction · 0.85

Tested by

no test coverage detected