cp_r

Crates.iocp_r
lib.rscp_r
version0.5.2
sourcesrc
created_at2021-10-24 21:40:30.743316
updated_at2024-10-07 16:18:06.507585
descriptionCopy files and directories recursively, preserving mtime and permissions
homepage
repositoryhttps://github.com/sourcefrog/cp_r
max_upload_size
id470562
size36,934
Martin Pool (sourcefrog)

documentation

README

Rust cp_r

https://github.com/sourcefrog/cp_r/

Docs Tests cargo-audit crates.io Maturity: Beta

A small Rust library to copy a directory tree preserving mtimes and permissions, with minimal dependencies, and with clean error reporting.

Features

  • Minimal dependencies: currently just filetime to support copying mtimes.
  • Returns a struct describing how much data and how many files were copied.
  • Tested on Linux, macOS and Windows.
  • Copies mtimes and permissions.
  • Takes an optional callback to decide which entries are copied or skipped, CopyOptions::filter.
  • Takes an optional callback to show progress or record which files are copied, CopyOptions::after_entry_copied.

See the docs for more information.

Patches welcome!

License: MIT.

Commit count: 76

cargo fmt