1 package testscript 2 3 import "golang.org/x/sys/unix" 4 5 // cloneFile makes a clone of a file via MacOS's `clonefile` syscall. 6 func cloneFile(from, to string) error { 7 return unix.Clonefile(from, to, 0) 8 } 9
View as plain text