I have a little irritating problem. How can I count files in directory in Zip? I want to avoid use ZipFile.entries() and then test every enum.
I have a little irritating problem. How can I count files in directory in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To count all files use
ZipFile.size().To count files in a specific directory the method you describe is the only option. Zip files are stored not with a hierarchical structure, just as a flat list with the file paths given.
It also varies as to whether these paths are absolute (for the source file system) or relative.