Closed Skgland closed 3 years ago
This may be reimplementing https://crates.io/crates/fs-err
Did't know about fs-err
until now. Though that wouldn't work for remove_dir_all
as this project is not using std::fs::remove_dir_all
, probably because of https://github.com/rust-lang/rust/issues/29497.
So that wrapper of the two would still be necessary.
Though it might be reasonable to also get better errors for other Filesystem operations using fs-err
only leaving remove_dir_all
like this.
Opened PR #47 to expand on this using fs-err
for all Filesystem operations where possible.
I feel like this approach is better than #47: bringing another dependency just for this is not really needed.
Thanks for working on the PRs! Merging.
maps error for all remove_dir_all calls where the result is not ignored (all but one) to the added Custom error type to also display the directory path
EDIT: also do this for file removals