MCPcopy Create free account
hub / github.com/cloudflare/agents / writeFileSync

Method writeFileSync

packages/shell/src/fs/in-memory-fs.ts:141–154  ·  view source on GitHub ↗
(
    path: string,
    content: FileContent,
    options?: WriteFileOptions | BufferEncoding,
    metadata?: { mode?: number; mtime?: Date }
  )

Source from the content-addressed store, hash-verified

139 // ── Sync helpers (used by consumers and constructor) ────────────────
140
141 writeFileSync(
142 path: string,
143 content: FileContent,
144 options?: WriteFileOptions | BufferEncoding,
145 metadata?: { mode?: number; mtime?: Date }
146 ): void {
147 this.insertContent(
148 path,
149 content,
150 getEncoding(options),
151 metadata?.mode,
152 metadata?.mtime
153 );
154 }
155
156 writeFileLazy(
157 path: string,

Callers

nothing calls this directly

Calls 2

insertContentMethod · 0.95
getEncodingFunction · 0.90

Tested by

no test coverage detected