MCPcopy Create free account
hub / github.com/bytebase/dbhub / isFile

Function isFile

src/utils/ssh-config-parser.ts:65–72  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

63 * @param filePath Path to check for an existing file
64 */
65function 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.

Callers 2

findDefaultSSHKeyFunction · 0.85
parseSSHConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected