(dir: string)
| 121 | } |
| 122 | |
| 123 | async function createDirIfNotExists(dir: string): Promise<boolean> { |
| 124 | try { |
| 125 | await fs.access(dir); |
| 126 | return false; // Directory already exists |
| 127 | } catch { |
| 128 | await fs.mkdir(dir, { recursive: true }); |
| 129 | return true; // Directory was created |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | async function checkFileExists(filePath: string): Promise<boolean> { |
| 134 | try { |
no outgoing calls
no test coverage detected