#copy #recursion #file

dircpy-stable

Copy directories recursively with flexible options. Runs on the stable channel.

1 unstable release

0.3.5 Mar 8, 2021

#1562 in Filesystem


Used in 2 crates

MIT license

11KB
175 lines

dircpy

Crates.io license Docs Status build

Runs on the stable channel

A library to recursively copy directories, with some convenience added.

 use dircpy::*;

 // Most basic example:
 copy_dir("src", "dest");

 // Simple builder example:
CopyBuilder::new("src", "dest")
  .run()
  .unwrap();

 // Copy recursively, only including certain files:
CopyBuilder::new("src", "dest")
  .overwrite_if_newer(true)
  .overwrite_if_size_differs(true)
  .with_include_filter(".txt")
  .with_include_filter(".csv")
  .run()
  .unwrap();
  

Dependencies

~0.1–7.5MB
~42K SLoC