mscabinet
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

node-mscabinet

Example

import { Extract, CFFile } from 'cabinet';
import * as path from 'path';
import * as fs from 'fs';
 
const extract = new Extract();
const dist = './dist';
fs.createReadStream('input.cab').pipe(extract)
    .on('entry', (file: CFFile, stream, next) => {
        const target = path.resolve(dist, '.' + file.name);
        const dirname = path.dirname(target);
        fs.mkdirSync(dirname, {recursive: true});
        stream
            .on('finish', () => next())
            .pipe(fs.createWriteStream(target));
    })
    .on('close', () => {
        console.log("ONCLOSE");
    });

Package Sidebar

Install

npm i mscabinet

Weekly Downloads

13

Version

1.0.2

License

Apache-2.0

Unpacked Size

198 kB

Total Files

79

Last publish

Collaborators

  • jc-lab