#metadata #file-metadata #copy #cross-platform #another

copy-metadata

Copy metadata from one file to another

1 unstable release

0.1.0 Sep 22, 2024

#835 in Filesystem

Download history 207/week @ 2024-09-22 16/week @ 2024-09-29 4/week @ 2024-10-06

227 downloads per month
Used in git-simple-encrypt

MIT license

6KB
61 lines

copy-metadata

cross-platform lib to copy metadata from one file to another.

Usage

cargo add copy-metadata

functions:

fn copy_permission(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()>;
fn copy_time(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()>;
fn copy_metadata(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()>;
// copy_metadata = copy_permission + copy_time

Dependencies

~0–7MB
~40K SLoC