Libraryless. Click here for Pure Java version (5025L/28K).
1 | static int countFilesInZip(File inZip) ctex { |
2 | temp ZipFile zipFile = new ZipFile(inZip); |
3 | ret countFilesInZip(zipFile); |
4 | } |
5 | |
6 | static int countFilesInZip(ZipFile zipFile) ctex { |
7 | int n = 0; |
8 | Enumeration entries = zipFile.entries(); |
9 | while (entries.hasMoreElements()) { |
10 | ZipEntry entry = cast entries.nextElement(); |
11 | if (!entry.isDirectory()) |
12 | ++n; |
13 | } |
14 | ret n; |
15 | } |
Began life as a copy of #1002029
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034360 |
Snippet name: | countFilesInZip |
Eternal ID of this version: | #1034360/1 |
Text MD5: | 5ba8c0c9fd7d7c52c2c8195279e3d3be |
Transpilation MD5: | b98b7a3125969c717753388f9aaaacb3 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-03 06:54:52 |
Source code size: | 402 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 185 / 240 |
Referenced in: | [show references] |