(dir: string, ext?: string)
| 75 | } |
| 76 | |
| 77 | export async function listFiles(dir: string, ext?: string): Promise<string[]> { |
| 78 | try { |
| 79 | const entries = await readdir(dir); |
| 80 | if (ext) return entries.filter((e) => e.endsWith(ext)); |
| 81 | return entries; |
| 82 | } catch { |
| 83 | return []; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | export async function removeFile(filePath: string): Promise<void> { |
| 88 | await unlink(filePath); |
no outgoing calls
no test coverage detected
searching dependent graphs…