Closed tmplt closed 2 years ago
If people do want their files to be overwritten, can't they just call std::fs::remove_dir_all()
first?
Michael Bryan @.***> writes:
If people do want their files to be overwritten, can't they just call std::fs::remove_dir_all() first? Yes, but this will remove all files in the directory. Overwriting files allow "untracked" files to remain.
Will this be merged if conflicts are fixed?
I'm going to close this PR for now.
My thinking is that:
Dir::extract()
method is a convenience function which will work for 90% of use casesuse include_dir::ExtractMode
, even though they aren't concerned about this use caseSee also Project Goals and Values.
A
dir::ExtractMode
enum is added with the optionsOverwrite
andFailIfExists
. The latter is the current behavior. The former truncates any already existing files.