1.0.7 • Published 12 months ago

7z-win v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

7z-win

搭配 node-7z 使用

import { extractFull, Data } from 'node-7z'
import { path7za } from '7z-win'

public static unzip(source: string, target: string): Promise<Data[]> {
    return new Promise(async (resolve, reject) => {
        let files: Data[] = []
        const myStream = extractFull(source, target, {
            $bin: path7za,
            charset: 'utf-8'
        })
        myStream.on('data', function (data) {
            files.push(data)
        })
        myStream.on('error', (err) => {
            reject(err)
        })
        myStream.on('end', function () {
            resolve(files)
        })

    })
}
1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago