MCPcopy Index your code
hub / github.com/codeaashu/claude-code / writeToFile

Function writeToFile

src/commands/copy/copy.tsx:73–80  ·  view source on GitHub ↗
(text: string, filename: string)

Source from the content-addressed store, hash-verified

71 return '.txt';
72}
73async function writeToFile(text: string, filename: string): Promise<string> {
74 const filePath = join(COPY_DIR, filename);
75 await mkdir(COPY_DIR, {
76 recursive: true
77 });
78 await writeFile(filePath, text, 'utf-8');
79 return filePath;
80}
81async function copyOrWriteToFile(text: string, filename: string): Promise<string> {
82 const raw = await setClipboard(text);
83 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