MCPcopy Index your code
hub / github.com/anomalyco/opencode / write

Function write

packages/opencode/test/session/instruction.test.ts:47–52  ·  view source on GitHub ↗
(filepath: string, content: string)

Source from the content-addressed store, hash-verified

45 self.pipe(Effect.provide(instructionLayer(global, flags)))
46
47const write = (filepath: string, content: string) =>
48 Effect.gen(function* () {
49 const fs = yield* FileSystem.FileSystem
50 yield* fs.makeDirectory(path.dirname(filepath), { recursive: true })
51 yield* fs.writeFileString(filepath, content)
52 })
53
54const writeFiles = (dir: string, files: Record<string, string>) =>
55 Effect.all(

Callers 7

writeFilesFunction · 0.70
echoWebSocketFunction · 0.50
echoWebSocketFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected