(path: string, content = '')
| 205 | } |
| 206 | |
| 207 | export 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 | |
| 214 | export async function createDirectory(path: string): Promise<PathMutationResponse> { |
| 215 | return requestJson<PathMutationResponse>('/api/dir', { |