Skip to content

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

Open
@kipcode66

Description

@kipcode66

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions