Skip to main content

copy

Function copy 

Source
pub fn copy(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<u64>
Available on crate feature fs only.
Expand description

Copy a file from one to another.

Directories will be created for the target location if not already exists.

if from and to is the pointing to the same, it might be truncated.

The number of bytes in to is returned.