(dbPath: string)
| 371 | // ==================== Filesystem cleanup helpers ==================== |
| 372 | |
| 373 | export 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 | |
| 385 | export function cleanupTempDatabases(tempDir: string): void { |
| 386 | try { |
no outgoing calls
no test coverage detected