pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> Result<u64>
Expand description
Copies the contents of one file to another.
If the destination file does not exist, it will be created. If it does exist, it will be overwritten.
ยงErrors
This function will error if the source file does not exist
or any other error according to OpenOptions::open
.