adm-zip
adm-zip copied to clipboard
Cannot get directory zipEntry
Running v 0.4.7
I have the following zip file:
unzip -vl test.zip
Archive: test.zip
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
978 Defl:N 349 64% 09-05-2017 14:53 1daaaa6a foo/ha.json
0 Stored 0 0% 08-04-2017 15:58 00000000 foo/one/two/
0 Stored 0 0% 08-04-2017 15:58 00000000 foo/one/three/
10284 Defl:N 10289 0% 08-03-2017 16:47 38ba62d5 foo/one/test.txt
15784 Defl:N 15789 0% 08-04-2017 15:58 4d62150a foo/one/two/test.txt
17289 Defl:N 17299 -0% 08-04-2017 15:58 14ece7f3 foo/one/three/test.tx
-------- ------- --- -------
44335 43726 1% 6 files
var AdmZip = require('adm-zip');
var zip = new AdmZip("./test.zip");
var oneDirectory = zip.getEntry('foo/one');
console.log('entry is', oneDirectory);
oneDirectory entry is null.
If it matters this zip was created programatically using Archiver (https://archiverjs.com/docs/Archiver.html#directory). With the directory function.