MCPcopy Index your code
hub / github.com/callstack/agent-device / removeIfPresent

Function removeIfPresent

scripts/clean-daemon.ts:53–61  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

51}
52
53function removeIfPresent(filePath: string): void {
54 try {
55 fs.unlinkSync(filePath);
56 } catch (error) {
57 if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {
58 throw error;
59 }
60 }
61}
62
63// Removes worktree-scoped state dirs under ~/.agent-device/dev/ that no live daemon
64// owns and that have been idle past the retention threshold. Never touches the

Callers 1

clean-daemon.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected