#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

#968 in Filesystem

21 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
~39K SLoC