Electron解压缩文件
解压sdk选择
npm install adm-zip
解压示例
const AdmZip = require('adm-zip');// Specify the path to your zip file and the destination directoryconst zipFilePath = 'path/to/your/file.zip';const destinationPath = 'path/to/extract/to';try {const zip = new AdmZip(zipFilePath);zip.extractAllTo(destinationPath, /* overwrite */ true); // Set true to overwrite existing filesconsole.log('Extraction complete!');} catch (error) {console.error('Error during extraction:', error);}