MCPcopy Index your code
hub / github.com/google/go-github / copyDir

Function copyDir

tools/metadata/main_test.go:230–244  ·  view source on GitHub ↗
(t *testing.T, dst, src string)

Source from the content-addressed store, hash-verified

228}
229
230func copyDir(t *testing.T, dst, src string) error {
231 fmt.Println("dst", dst)
232 dst, err := filepath.Abs(dst)
233 if err != nil {
234 return err
235 }
236 return filepath.Walk(src, func(srcPath string, info fs.FileInfo, err error) error {
237 if err != nil || info.IsDir() {
238 return err
239 }
240 dstPath := filepath.Join(dst, mustRel(t, src, srcPath))
241 err = copyFile(srcPath, dstPath)
242 return err
243 })
244}
245
246func copyFile(src, dst string) (errOut error) {
247 srcDirStat, err := os.Stat(filepath.Dir(src))

Callers 1

runTestFunction · 0.85

Calls 2

mustRelFunction · 0.85
copyFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…