(directory: string, filenames: string[])
| 21 | } |
| 22 | |
| 23 | export async function someFileExists(directory: string, filenames: string[]): Promise<boolean> { |
| 24 | for (let index = 0; index < filenames.length; index++) { |
| 25 | const filename = filenames[index]; |
| 26 | if (!filename) continue; |
| 27 | |
| 28 | const path = pathModule.join(directory, filename); |
| 29 | if (await pathExists(path)) { |
| 30 | return true; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | return false; |
| 35 | } |
| 36 | |
| 37 | export async function removeFile(path: string) { |
| 38 | await fsModule.unlink(path); |
no test coverage detected
searching dependent graphs…