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

Function write

packages/computer/tests/script-runner.test.ts:3–9  ·  view source on GitHub ↗
(path: string, source: string)

Source from the content-addressed store, hash-verified

1import { SELF } from "cloudflare:test";
2
3async function write(path: string, source: string) {
4 const response = await SELF.fetch(`https://example.test/write?path=${encodeURIComponent(path)}`, {
5 method: "POST",
6 body: source,
7 });
8 expect(response.status).toBe(204);
9}
10
11async function symlink(target: string, path: string) {
12 const response = await SELF.fetch(

Callers 1

Calls 1

fetchMethod · 0.65

Tested by

no test coverage detected