MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / writeToFile

Function writeToFile

source code/commands/copy/copy.tsx:75–82  ·  view source on GitHub ↗
(text: string, filename: string)

Source from the content-addressed store, hash-verified

73 return '.txt';
74}
75async function writeToFile(text: string, filename: string): Promise<string> {
76 const filePath = join(COPY_DIR, filename);
77 await mkdir(COPY_DIR, {
78 recursive: true
79 });
80 await writeFile(filePath, text, 'utf-8');
81 return filePath;
82}
83async function copyOrWriteToFile(text: string, filename: string): Promise<string> {
84 const raw = await setClipboard(text);
85 if (raw) process.stdout.write(raw);

Callers 2

copyOrWriteToFileFunction · 0.85
handleWriteFunction · 0.85

Calls 1

mkdirFunction · 0.85

Tested by

no test coverage detected