* Check if a path points to an existing file. * * This function uses statSync and will follow symlinks. It does not * require the path to be pre-resolved; any path accepted by statSync * can be used. * * @param filePath Path to check for an existing file
(filePath: string)
| 63 | * @param filePath Path to check for an existing file |
| 64 | */ |
| 65 | function isFile(filePath: string): boolean { |
| 66 | try { |
| 67 | const stat = statSync(filePath); |
| 68 | return stat.isFile(); |
| 69 | } catch { |
| 70 | return false; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Find the first existing SSH key from default locations. |
no outgoing calls
no test coverage detected