Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
io/ioutil: Add CopyFile #8868
What should be the correct order for the arguments? dst first or src first?
On a related note, do we need io/ioutil.MoveFile?
I hope ioutil.MoveFile use sys.MoveFile on windows.
Path.copy(src, dst, options)
use File::Copy; copy(src, dst);
sendfile(output_fd, input_fd, &offset, size)
$ cp src.txt dst.txt
Other issues worth considering for this API:
File systems on Linux has the SELinux context, POSIX ACL and extended attributes.
I don't mean to propose that ioutil.CopyFile should handle all those complexities, but we need to
I'd also consider simplifying API by removing
func CopyFile(src, dst string, perm os.FileMode) error
The rationale is that
My take on that is the