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

Add info_list function for querying information on non-streamed files #21

Merged
merged 5 commits into from
Oct 1, 2023

Conversation

pR0Ps
Copy link
Owner

@pR0Ps pR0Ps commented Oct 1, 2023

No description provided.

Avoids having to store the paths and size of files multiple times
At the point these checks are done the arcname will have already been
sanitized so it's only required to check for the "/", not any
platform-specific separators.
This adds the `ZipStream.info_list` function which will return a list of
information on all the files that have been added to the stream. This
also includes information on files that have not been streamed yet.

This was added because `ZipStream.get_info` only returned information on
files that had already been streamed. The new `ZipStream.info_list`
function gives the ability to query the stream for things like number of
files, total size, etc. before starting to generate it.

In order to preserve compatibility `ZipStream.get_info` was not removed,
but will now emit a `DeprecationWarning` when used.
@pR0Ps pR0Ps merged commit 17db6d8 into master Oct 1, 2023
19 checks passed
@pR0Ps pR0Ps deleted the feature/introspection branch October 1, 2023 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant