MCPcopy
hub / github.com/danielmiessler/Fabric / copyFile

Function copyFile

internal/tools/githelper/githelper.go:175–190  ·  view source on GitHub ↗
(src, dst string)

Source from the content-addressed store, hash-verified

173}
174
175func copyFile(src, dst string) error {
176 srcFile, err := os.Open(src)
177 if err != nil {
178 return err
179 }
180 defer srcFile.Close()
181
182 dstFile, err := os.Create(dst)
183 if err != nil {
184 return err
185 }
186 defer dstFile.Close()
187
188 _, err = io.Copy(dstFile, srcFile)
189 return err
190}

Callers 1

fetchFilesViaGitCLIFunction · 0.70

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected