[][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 of from.
  • If parent directories of to do not exist, they are created.
  • Symlinks are not followed but copied "verbatim".
  • Files that exist under to and under from are overwritten with the file under from.
  • Files that exist under to but not under from are not touched.