mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
24 lines
602 B
JavaScript
24 lines
602 B
JavaScript
const fs = require('fs');
|
|
const unzip = require('unzip');
|
|
|
|
fs.createReadStream('archive.zip')
|
|
.pipe(unzip.Parse())
|
|
.on('entry', entry => {
|
|
const fileName = entry.path;
|
|
entry.pipe(fs.createWriteStream(fileName));
|
|
});
|
|
|
|
var Writer = require('fstream').Writer;
|
|
fs.createReadStream('archive.zip')
|
|
.pipe(unzip.Parse())
|
|
.on('entry', entry => {
|
|
const fileName = entry.path;
|
|
entry.pipe(Writer({path: fileName}));
|
|
});
|
|
|
|
fs.createReadStream('archive.zip')
|
|
.pipe(unzip.Parse())
|
|
.on('entry', entry => {
|
|
const fileName = entry.path;
|
|
var file = fs.openSync(fileName, "w");
|
|
}); |