MCPcopy Create free account
hub / github.com/andylow92/file-system-like-github / createFile

Function createFile

apps/web/src/api/files.ts:207–212  ·  view source on GitHub ↗
(path: string, content = '')

Source from the content-addressed store, hash-verified

205}
206
207export async function createFile(path: string, content = ''): Promise<RemoteFile> {
208 return requestJson<RemoteFile>('/api/file', {
209 method: 'POST',
210 body: JSON.stringify({ path, content }),
211 });
212}
213
214export async function createDirectory(path: string): Promise<PathMutationResponse> {
215 return requestJson<PathMutationResponse>('/api/dir', {

Callers 1

AppFunction · 0.90

Calls 1

requestJsonFunction · 0.70

Tested by

no test coverage detected