[−][src]Function memora::fs::copy
pub fn copy<P, Q>(from: P, to: Q) -> Result<()> where
P: AsRef<Path>,
Q: AsRef<Path>,
Recursively copy path from
to path to
.
to
must not be a subpath offrom
.- If parent directories of
to
do not exist, they are created. - Symlinks are not followed but copied "verbatim".
- Files that exist under
to
and underfrom
are overwritten with the file underfrom
. - Files that exist under
to
but not underfrom
are not touched.