MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / deleteTempDatabase

Function deleteTempDatabase

packages/node-runtime/src/merger/temp-db.ts:373–383  ·  view source on GitHub ↗
(dbPath: string)

Source from the content-addressed store, hash-verified

371// ==================== Filesystem cleanup helpers ====================
372
373export function deleteTempDatabase(dbPath: string): void {
374 try {
375 if (fs.existsSync(dbPath)) fs.unlinkSync(dbPath)
376 const walPath = dbPath + '-wal'
377 const shmPath = dbPath + '-shm'
378 if (fs.existsSync(walPath)) fs.unlinkSync(walPath)
379 if (fs.existsSync(shmPath)) fs.unlinkSync(shmPath)
380 } catch {
381 /* best-effort cleanup */
382 }
383}
384
385export function cleanupTempDatabases(tempDir: string): void {
386 try {

Callers 4

deleteMethod · 0.90
clearMethod · 0.90
cleanupExpiredMethod · 0.90
cleanupTempDatabasesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected