pub fn rec_copy_inefficiently(
from: impl AsRef<Path>,
to: impl AsRef<Path>,
) -> Result<()>Available on crate feature
fs only.Expand description
(Inefficiently) recursively copy all files in from directory to to directory.
Old files in to are NOT removed if no corresponding file exists in from.
(If that behavior is desired, call cu::fs::make_dir_empty or
cu::fs::remove_contents first)
The implementation is naive, suitable for a quick invocation in your build scripts or something. Find other crates if you are looking for an efficient solution that does not involve cloning the files.
§Behavior
towill be created if does not exist.- symlinks are not followed (they are copied as-is)
§Will error if:
fromis not a directory, ortoexists and is not a directory- there is a path in
tothat is a directory and not a directory infrom, or vice versa