0.0.6 • Published 8 years ago

readfiles-async v0.0.6

Weekly downloads
27
License
-
Repository
github
Last release
8 years ago

readfiles(path, filecb, cb)

Walks a given path and its subdirectories, collecting file information along the way.

filecb(fileName, filePath, stat)
Callback function for individual files.
filePath is the full path to the file, including the filename.
stat is a fs.Stats object.

cb(err, files)
Used for error handling or when all files have been read.
files is an array of objects with properties 'name', 'path', and 'stat'.

usage

var readfiles = require('readfiles-async');

readfiles('/some/path/to/files', function(name, path, stat) {
  console.log('Do something with file', name);
}, function(err, files) {
  if(err) { console.error(err); }
});

license

MIT

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago