md5file-flowcontrol
v1.0.0
Published
const filecontrol = require('./md5');
Downloads
7
Readme
测试模块
引入模块
const filecontrol = require('./md5');
加入文件
let test = new filecontrol('../../3.mail\hxh25815-201604.pst');
监控文件读取进度
test.on('progress', message => { console.log(message) });
监控出错
test.on('error',s => { console.log(s) })
执行计算
test.start();
2秒后暂停
let times = setTimeout(() => { test.pasue() },2000)
3秒后续传
let time1 = setTimeout(() => { test.resume() },3000)
4秒后删除
let time3 = setTimeout(() => { test.cancel() },4000)