MCPcopy Create free account
hub / github.com/freecodexyz/free-code / appendAsync

Function appendAsync

src/utils/debug.ts:140–151  ·  view source on GitHub ↗
(
  needMkdir: boolean,
  dir: string,
  path: string,
  content: string,
)

Source from the content-addressed store, hash-verified

138// Module-level so .bind captures only its explicit args, not the
139// writeFn closure's parent scope (Jarred, #22257).
140async function appendAsync(
141 needMkdir: boolean,
142 dir: string,
143 path: string,
144 content: string,
145): Promise<void> {
146 if (needMkdir) {
147 await mkdir(dir, { recursive: true }).catch(() => {})
148 }
149 await appendFile(path, content)
150 void updateLatestDebugLogSymlink()
151}
152
153function noop(): void {}
154

Callers

nothing calls this directly

Calls 1

mkdirFunction · 0.85

Tested by

no test coverage detected