1.0.7 • Published 2 years ago

7z-win v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years 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

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago