-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent Directory Extraction Management #316
Comments
Hi Michael, Since the ZIP specification also doesn't outline a concept of hierarchy/parent-child relationships at all (e.g. Do you have a specific use case that'd benefit from having the parent directory handling in the |
Yes - that's where the idea comes from. :) I have a need to inspect individual "root level"
What if it was done on an |
The behavior you are describing in your initial comment can be implemented with the existing I'd prefer to keep the core API surface area small but provide extensible methods (like the existing, closure-based read/write helpers) for API consumers. |
I was thinking about making a contribution to provide parent directory management within Archive itself, instead of just when using the FileManager extension.
Basically, I envision adding a
parentDirectory: String?
property toArchive
that would be utilized in both extraction and compression.When opening an
Archive
in.read
mode, it would parse the contents and determine if there's a parent directory and, if so, populate the value. During extraction, you'd have the option to include or omit the parent directory.Entry
s provided from theArchive
could either reflect this value in theirpath
or have an additionalpathFromParent
property.When opening an
Archive
in.create
or.update
modes, it would either append or ignore the parent directory as appropriate when adding content.Is there interest for this? Time permitting, I would contribute this myself, but would want to make sure the time invested would be worth it.
The text was updated successfully, but these errors were encountered: