//trywalker.js

//Copy following code and paste in trywalker.js file

let Walker = require('./walker.js'); let walker = new Walker('D:\\',true); /*walker.filterDir((dir,stat) => { return dir !== 'D:\\'; }); walker.filterFile((file,stat)=>{ return stat.size > 500000; });*/ walker.on('dir', (dir,stat) => { //console.log('dir) }) walker.on('error', (err,stat) => { //console.error(err); }) walker.on('file', (file,stat) => { console.log(file); }) walker.on('pause', () =>{ //console.log('paused') }) walker.on('done', () => { //console.log('finish'); }) setTimeout( () => { walker.pause(); }, 10); setTimeout( () => { walker.resume(); }, 100); setTimeout( () => { walker.pause(); }, 200);