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

Function writeFiles

packages/opencode/test/session/instruction.test.ts:54–58  ·  view source on GitHub ↗
(dir: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

52 })
53
54const writeFiles = (dir: string, files: Record<string, string>) =>
55 Effect.all(
56 Object.entries(files).map(([file, content]) => write(path.join(dir, file), content)),
57 { discard: true },
58 )
59
60const withFiles = <A, E, R>(files: Record<string, string>, self: (dir: string) => Effect.Effect<A, E, R>) =>
61 provideTmpdirInstance((dir) =>

Callers 2

withFilesFunction · 0.85
tmpWithFilesFunction · 0.85

Calls 2

writeFunction · 0.70
allMethod · 0.45

Tested by

no test coverage detected