Node.js example contains zipped folder instead of file
See original GitHub issueFor me the node.js compression example on '‘ADM-ZIP-Introduction’ on the wiki produces readable zip but with an empty folder named ‘test.txt’ instead of the ‘test.txt’ file.
I got adm-zip from npm today, it’s package.json says 0.1.8 and this was on windows vista 64bit, my node.js is 0.8.14 x64 and I unzip using good ol’ WinRar.
My code:
var zip = new Zip();
zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here");
zip.writeZip(path + '/package.zip');`
Issue Analytics
- State:
- Created 11 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How To Work With Zip Files in Node.js
First, you'll combine multiple files into a ZIP archive using adm-zip . You'll then list the ZIP archive contents. After that, you'll add...
Read more >Need to ZIP an entire directory using Node.js
I ended up using archiver lib. Works great. Example var file_system = require('fs'); var archiver = require('archiver'); var output ...
Read more >Working with Zip Files in Node.js
Zip files are a common format for compressed files and folders. Most developers end up using tarballs instead of zip files.
Read more >How to Create Zip files with Node.js
Create a new folder and open the command terminal inside it. · Type npm init -y to initialize the project. · Install the...
Read more >Best methods for unzipping files in Node.js
You can also add folders to your .zip file and add files to the folder using the folder method, which takes the folder's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

+1 still having this issue on 0.4.7
Same problem with
0.4.7