Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / readdirp / examples / stream-api.js
1 var readdirp =  require('..')
2   , path = require('path');
3
4 readdirp({ root: path.join(__dirname), fileFilter: '*.js' })
5   .on('warn', function (err) { 
6     console.error('something went wrong when processing an entry', err); 
7   })
8   .on('error', function (err) { 
9     console.error('something went fatally wrong and the stream was aborted', err); 
10   })
11   .on('data', function (entry) { 
12     console.log('%s is ready for processing', entry.path);
13     // process entry here
14   });
15