(text: string, filename: string)
| 73 | return '.txt'; |
| 74 | } |
| 75 | async 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 | } |
| 83 | async function copyOrWriteToFile(text: string, filename: string): Promise<string> { |
| 84 | const raw = await setClipboard(text); |
| 85 | if (raw) process.stdout.write(raw); |
no test coverage detected