我adm-zip
用来压缩local directory and all its nested files and directories.
var AdmZip = require('adm-zip');
var pathToZip = process.env.PUBLIC + '/Demo/Backup.zip';
var zip = new AdmZip();
zip.addLocalFolder("C:\\Users\\Public\\Test\\db");
zip.writeZip(pathToZip);
问题:
所有文件都作为文件夹添加到 zip 中,实际内容没有被压缩。
我哪里错了?