0.2.1 • Published 6 years ago

@singcl/concat v0.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

nodejs 基于Stream 的文件合并模块

利用该模块可以很方便的将分片上传的多个chunk合并成一个文件。

Install

npm i @singcl/concat -S

API

contact

contact(srcDir, destination,callback)

参数数据类型参数描述
srcDirString资源目录。需要合并的文件所在的目录路径
destinationString目标文件。最终合并成的文件路径
callbackFunction合并成功或者失败的回调函数
  • callback 回调函数
    • err callback的唯一参数,没有错误时候该参数值为null

Example:

var concat = require('@singcl/concat')

var targetDir = './txt'
var dest = './data'

// 将txt 目录下所有文件合并为一个名为data的无扩展名的文件
concat(targetDir, dest, function(err) {
    if (err) return console.error('ERROR:', err)
    console.log('完成')
})
0.2.1

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago