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