Michael-F-Bryan / include_dir

The logical evolution of the include_str macro for embedding a directory tree into your binary.
https://michael-f-bryan.github.io/include_dir
MIT License
319 stars 36 forks source link

dir/extract: add mode for overwriting existing files #65

Closed tmplt closed 2 years ago

tmplt commented 2 years ago

A dir::ExtractMode enum is added with the options Overwrite and FailIfExists. The latter is the current behavior. The former truncates any already existing files.

Michael-F-Bryan commented 2 years ago

If people do want their files to be overwritten, can't they just call std::fs::remove_dir_all() first?

tmplt commented 2 years ago

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.

tmplt commented 2 years ago

Will this be merged if conflicts are fixed?

Michael-F-Bryan commented 2 years ago

I'm going to close this PR for now.

My thinking is that:

See also Project Goals and Values.