(file: string)
| 179 | } |
| 180 | |
| 181 | export async function existsAndIsFileAsync(file: string): Promise<boolean> { |
| 182 | try { |
| 183 | const stat = await fs.promises.stat(file); |
| 184 | return stat?.isFile() ?? false; |
| 185 | } catch { |
| 186 | return false; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | export async function existsAndIsDirectoryAsync(file: string): Promise<boolean> { |
| 191 | try { |
no outgoing calls
no test coverage detected