MCPcopy Create free account
hub / github.com/wonderwhy-er/DesktopCommanderMCP / write

Method write

src/utils/files/text.ts:62–68  ·  view source on GitHub ↗
(path: string, content: string, mode: 'rewrite' | 'append' = 'rewrite')

Source from the content-addressed store, hash-verified

60 }
61
62 async write(path: string, content: string, mode: 'rewrite' | 'append' = 'rewrite'): Promise<void> {
63 if (mode === 'append') {
64 await fs.appendFile(path, content);
65 } else {
66 await fs.writeFile(path, content);
67 }
68 }
69
70 async getInfo(path: string): Promise<FileInfo> {
71 const stats = await fs.stat(path);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected