当我使用archiverjs时,我无法打开生成的zip文件:
var archive = archiver('zip');
var output = fs.createWriteStream(projectName + '.zip');
archive.pipe(output);
archive.on('error', function(err) {
throw err;
});
output.on('close', function() {
console.log('Package complete!');
});
archive.bulk([
{expand: true, cwd: projectPath, src:['**/*'], data: {mode: 0755}}
]).finalize();
创建了zip文件,但我没有权限打开它。我做错了什么?