Go copy directory recursively
copy copies directories recursively.
package main
import (
"fmt"
cp "github.com/otiai10/copy"
)
func main() {
err := cp.Copy("your/src", "your/dest")
fmt.Println(err) // nil
}…// For example...
opt := Options{
Skip: func(info os.FileInfo, src, dest string) (bool, error) {
return strings.HasSuffix(src, ".git"), nil
},
}
err := Copy("your/directory", "your/directory.copy", opt)No open issues yet, or sync has not completed.