(filePath)
| 23 | * @returns A promise that resolves to true if the file exists and is a regular file, false otherwise. |
| 24 | */ |
| 25 | const fileExists = async (filePath) => { |
| 26 | try { |
| 27 | const stats = await fsp.lstat(filePath) |
| 28 | return stats.isFile() |
| 29 | } catch (e) { |
| 30 | return false |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Checks if a directory exists at the given path. |
no outgoing calls
no test coverage detected
searching dependent graphs…