bulk-loader
v0.0.8
Published
Load all files matching a regex and performs a callback on them.
Downloads
21
Readme
Bulk Loader
Bulk Loader is a node.js module that can load all files in a given directory with filename matching a regular expression pattern. You can also pass a callback to be run when matching files are loaded.
loadDir (dir, pattern, callback)
- dir: can be a file name or a path to a directory
- pattern: regex pattern to filter the files. eg: /Model.coffee$/i
- callback: call back will be run on each file
loadDirs (dirs, pattern, callback)
- dirs: an array of dir (reference: loadDir.dir)
- pattern: regex pattern to filter the files. eg: /Model.coffee$/i
- callback: call back will be run on each file
callback (err, file, filename)
- err: Error object with a message
- file: The required file
- filename: The filename
How to install
$ npm install bulk-loader