(filePath: string)
| 56 | * Check if a file or directory exists. |
| 57 | */ |
| 58 | export async function fileExists(filePath: string): Promise<boolean> { |
| 59 | try { |
| 60 | await fs.access(filePath); |
| 61 | return true; |
| 62 | } catch { |
| 63 | return false; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Read and parse a JSON file. |
no outgoing calls
no test coverage detected