MCPcopy
hub / github.com/anomalyco/opencode / cleanup

Function cleanup

packages/desktop/src/main/logging.ts:118–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116}
117
118function cleanup() {
119 const dir = root || dirname(log.transports.file.getFile().path)
120 const cutoff = Date.now() - MAX_LOG_AGE_DAYS * 24 * 60 * 60 * 1000
121
122 for (const entry of readdirSync(dir)) {
123 const file = join(dir, entry)
124 try {
125 const info = statSync(file)
126 if (info.mtimeMs < cutoff) rmSync(file, { recursive: true, force: true })
127 } catch {
128 continue
129 }
130 }
131}
132
133function manifest() {
134 return {

Callers 1

initLoggingFunction · 0.70

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected