https://github.com/sourcefrog/cp_r
Rust library to copy a directory tree preserving mtimes and permissions
https://github.com/sourcefrog/cp_r
Last synced: 5 months ago
JSON representation
Rust library to copy a directory tree preserving mtimes and permissions
- Host: GitHub
- URL: https://github.com/sourcefrog/cp_r
- Owner: sourcefrog
- License: mit
- Created: 2021-10-24T20:42:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T15:16:56.000Z (over 1 year ago)
- Last Synced: 2025-07-07T09:19:53.901Z (7 months ago)
- Language: Rust
- Size: 69.3 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust `cp_r`
[](https://docs.rs/cp_r)
[](https://github.com/sourcefrog/cp_r/actions?query=workflow%3ATests)
[](https://github.com/sourcefrog/cp_r/actions/workflows/cargo-audit.yml)
[](https://crates.io/crates/cp_r)

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](https://docs.rs/cp_r) for more information.
Patches welcome!
License: MIT.