MCPcopy Create free account
hub / github.com/OpenDCAI/OpenPrism / writeFile

Function writeFile

apps/frontend/src/api/client.ts:184–189  ·  view source on GitHub ↗
(id: string, filePath: string, content: string)

Source from the content-addressed store, hash-verified

182}
183
184export function writeFile(id: string, filePath: string, content: string) {
185 return request<{ ok: boolean }>(`/api/projects/${id}/file`, {
186 method: 'PUT',
187 body: JSON.stringify({ path: filePath, content })
188 });
189}
190
191export function getAllFiles(id: string) {
192 return request<{ files: { path: string; content: string; encoding?: 'utf8' | 'base64' }[] }>(

Callers 1

EditorPageFunction · 0.90

Calls 1

requestFunction · 0.85

Tested by

no test coverage detected