MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / cleanupTemp

Function cleanupTemp

apps/cli/src/http/routes/web/import.ts:32–45  ·  view source on GitHub ↗
(...paths: string[])

Source from the content-addressed store, hash-verified

30}
31
32function cleanupTemp(...paths: string[]) {
33 for (const p of paths) {
34 try {
35 const stat = fs.statSync(p)
36 if (stat.isDirectory()) {
37 fs.rmSync(p, { recursive: true, force: true })
38 } else {
39 fs.unlinkSync(p)
40 }
41 } catch {
42 /* ignore */
43 }
44 }
45}
46
47export function registerImportRoutes(
48 server: FastifyInstance,

Callers 1

registerImportRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected