MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / writeFile

Method writeFile

freebuff/e2e/utils/freebuff-session.ts:62–69  ·  view source on GitHub ↗

Write a file into the session's working directory.

(relativePath: string, content: string)

Source from the content-addressed store, hash-verified

60
61 /** Write a file into the session's working directory. */
62 writeFile(relativePath: string, content: string): void {
63 const filePath = path.join(this.workDir, relativePath)
64 const dir = path.dirname(filePath)
65 if (!fs.existsSync(dir)) {
66 fs.mkdirSync(dir, { recursive: true })
67 }
68 fs.writeFileSync(filePath, content, 'utf-8')
69 }
70
71 /** Read a file from the session's working directory. */
72 readFile(relativePath: string): string {

Callers 7

copyLastLogLinesFunction · 0.80
applyChangeFunction · 0.80
applyPatchToolFunction · 0.80
writeTraceFunction · 0.80
runOnceFunction · 0.80

Calls

no outgoing calls

Tested by 2

writeTraceFunction · 0.64
runOnceFunction · 0.64