iterate-files
iterate all the files
Last updated 12 years ago by raynos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install iterate-files 
SYNC missed versions from official npm registry.

iterateFiles

Iterate all the files

Examples

Basic usage:

var iterateFiles = require("iterate-files"),
    path = require("path")

// Load all javascript files in the test folder or any of their sub folders
iterateFiles(path.join(process.cwd(), "./test"), function (fileName) {
    // run code for each recursively found js file
}, function (err) {
    // run code when all files have been found recursively
}, /.js$/)

Documentation

iterateFiles(uri, fileCallback, finishCallback, regexp)

recursively call the fileCallback for every file in the folder. Calls the finishCallback if all files have been handled or if an err occurs.

Optionally pass in a regexp to match the fileName by. If the regexp fails then the fileCallback will not be called for that file

MIT Licenced

Current Tags

  • 0.1.1                                ...           latest (12 years ago)

2 Versions

  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |