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

Method write

packages/shell/src/tests/agents/workspace.ts:50–60  ·  view source on GitHub ↗
(
    path: string,
    content: string,
    mimeType?: string
  )

Source from the content-addressed store, hash-verified

48 }
49
50 async write(
51 path: string,
52 content: string,
53 mimeType?: string
54 ): Promise<void | { error: string }> {
55 try {
56 await this.workspace.writeFile(path, content, mimeType);
57 } catch (e) {
58 return { error: (e as Error).message };
59 }
60 }
61
62 async del(path: string): Promise<boolean | { error: string }> {
63 try {

Callers

nothing calls this directly

Calls 1

writeFileMethod · 0.65

Tested by

no test coverage detected