util.log('Extracting contents...'.green); const zip = new AdmZip(zipFile); zip.extractAllTo('', true); fs.move(fromDir, directories[dir], function(err) { if (err) {
async _unpackVersion (DVP) { const versionArchive = new Unzip(DVP); await versionArchive.extractAllTo(this._downloadPath, true); return versionArchive; }
async extractPackage (options = this.options) { if (options.clientPackage.startsWith('http')) { await this.downloadAsync(options.clientPackage, options.root, 'clientPackage.zip', true, 'client-package') options.clientPackage = path.join(options.root, 'clientPackage.zip') } new Zip(options.clientPackage).extractAllTo(options.root, true) if (options.removePackage) fs.unlinkSync(options.clientPackage) return this.client.emit('package-extract', true) }
function extractProjectZipfiles() { console.log("Extracting zip files..."); const zip = new admZip(tempZip); const mainEntry = zip.getEntries()[0].entryName; zip.extractAllTo(tempDir, true); // use copySync instead of moveSync as the later one can remove execution dir // in linux on `cmints --example` copySync(path.join(tempDir, mainEntry), srcPath, {overwrite: true}); removeSync(tempDir); }
function finishRemote(err,result) { configName = configName.split(':').pop(); if (argv.verbose) console.log('Making/cleaning output directories'); mkdirp(path.join(config.outputDir,configName),function(){ rimraf(path.join(config.outputDir,configName)+'/*',function(){ if (argv.zip) { fs.writeFileSync(path.join(config.outputDir,configName,configName+'.zip'),result); } else { const zip = new admzip(result); if (argv.verbose) { console.log('Unzipping...'); const zipEntries = zip.getEntries(); // an array of ZipEntry records zipEntries.forEach(function(zipEntry) { console.log(zipEntry.entryName); }); } zip.extractAllTo(config.outputDir,true); } }); }); }
zip.extractAllTo(folder); // zip.extractEntryTo(entry, folder, /*maintainEntryPath*/false, /*overwrite*/true);
fs.writeFileSync(`${dir}.zip`, downloadedCode) var zipFolder = new zip(`${dir}.zip`) zipFolder.extractAllTo(`${dir}`) var clayConfig = clayConfigGenerator.defaultTemplate(service.name.split('-').slice(1).join('-'), service.type, service.function_input, service.description, service.name.split('-').shift()) fs.writeFileSync(`${dir}/clay-config.json`, JSON.stringify(clayConfig, null, 2))
new Zip(path.join(nativeDirectory, name)).extractAllTo(nativeDirectory, true) } catch (e) {
new AdmZip(await api.exportZip(groupId)).extractAllTo(tmpDir.name); fs.mkdirSync(tmpSrc);
zip.extractAllTo(gameNativeFolder + version, true);
try { const zip = new admZip(body) zip.extractAllTo(AppPathFolder, true)