Skip to content
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

Obtaining metadata on entries without needing mutable references to ZipArchive #148

Open
kipcode66 opened this issue May 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kipcode66
Copy link

Is your feature request related to a problem? Please describe.
I wish to look if a certain path in the zip exists, and if it is a directory or not. I would need to be able to get that metadata from a &ZipArchive<R>, but I can only get the info on if it is a directory by using obtaining a mutable instance of a ZipFile with ZipArchive<R>::by_*(&mut self, ...) even if I only want to get some information on the file. And since I don't have a mutable reference available, I can't get the metadata I need.

Describe the solution you'd like
I wish I could access the metadata from a zip archive/internal entry (file/directory) without requiring a mutable reference.

Describe alternatives you've considered
As mentioned above, the only way to get the information about a file metadata required to get a mutable reference of the archive, which since I need to iterate through directories, I need to be able to use an immutable reference.

Additional context
This repository is the repo which I have the problem on. More specifically, here.

@kipcode66 kipcode66 added the enhancement New feature or request label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant