#copy #recursive #filesystem #file

dircpy

Copy directories recursively with flexible options

12 releases

0.3.8 Oct 2, 2021
0.3.7 Jun 24, 2021
0.3.6 Mar 16, 2021
0.3.4 Aug 30, 2020
0.1.0 Aug 26, 2020

#67 in Filesystem

Download history 1528/week @ 2021-10-02 1413/week @ 2021-10-09 934/week @ 2021-10-16 2289/week @ 2021-10-23 1396/week @ 2021-10-30 2383/week @ 2021-11-06 1238/week @ 2021-11-13 2000/week @ 2021-11-20 1316/week @ 2021-11-27 1532/week @ 2021-12-04 1229/week @ 2021-12-11 867/week @ 2021-12-18 464/week @ 2021-12-25 736/week @ 2022-01-01 795/week @ 2022-01-08 978/week @ 2022-01-15

3,237 downloads per month
Used in 2 crates

MIT license

18KB
373 lines

dircpy

Crates.io license Docs Status build 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();
  

lib.rs:

Recursively copy a directory from a to b.

use dircpy::*;

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

// 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

~225KB

Wa