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.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
For count file on particular directory use below code.
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.