alexcrichton / tar-rs

Tar file reading/writing for Rust
https://docs.rs/tar
Apache License 2.0
616 stars 178 forks source link

Allow setting mode for all `Builder::append_*` methods? #345

Open iwinux opened 8 months ago

iwinux commented 8 months ago

Hi,

I'd like to control the mode / permission of files that are added to the archive, but it's very tedious to implement with current public APIs. Basically I need to copy all the append_* code from builder.rs to allow setting mode for append_dir_all and append_path_with_name.

It would be great if we can have something like append_dir_all_with_mode or something like that.