MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / KeyExists

Function KeyExists

utils/keys.go:21–28  ·  view source on GitHub ↗

KeyExists checks if the SSH key file exists for a given UUID

(uuid string)

Source from the content-addressed store, hash-verified

19
20// KeyExists checks if the SSH key file exists for a given UUID
21func KeyExists(uuid string) bool {
22 keyFile := GetKeyFile(uuid)
23 if keyFile == "" {
24 return false
25 }
26 _, err := os.Stat(keyFile)
27 return err == nil
28}
29
30// SavePrivateKey writes the private key to disk with appropriate permissions
31func SavePrivateKey(uuid, privateKey string) error {

Callers 3

runSCPFunction · 0.92
runConnectWithOptionsFunction · 0.92

Calls 2

GetKeyFileFunction · 0.85
StatMethod · 0.65

Tested by 1