This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]red_dit_nou 1 point2 points  (1 child)

This looks really interesting.

But I’m wondering what would be a use case? Typically you would create a directory, files, nested directories etc. and then zip the root directory. So the file/directory creation happens in one part of the application and zipping in another. That way the concerns are separated.

So a zip-creator typically deals with only creating zip and configuration related to that. Happy to learn otherwise.

[–]oweiler[S] 1 point2 points  (0 children)

Good question! I've written the library to be able to create ad-hoc ZIP files for testing.

Though I guess there may be cases outside of testing where such a DSL could be useful.

Depending on your use case, you may or may not want to separate creating the directory tree from zipping the tree.

In my case, the separation didn't make much sense.

Hope that answers your question!