MCPcopy Create free account
hub / github.com/Mister-leo/fssh / copyFile

Function copyFile

internal/sshconfig/writer.go:503–509  ·  view source on GitHub ↗

copyFile copies a file from src to dst

(src, dst string)

Source from the content-addressed store, hash-verified

501
502// copyFile copies a file from src to dst
503func copyFile(src, dst string) error {
504 content, err := os.ReadFile(src)
505 if err != nil {
506 return err
507 }
508 return os.WriteFile(dst, content, 0600)
509}

Callers 4

WriteGlobalConfigFunction · 0.70
WriteHostConfigFunction · 0.70
DeleteHostConfigFunction · 0.70
backupSSHConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected