fshost / node-dir

Recursive asynchronous file and directory operations for Node.js
MIT License
221 stars 44 forks source link

Implement... #21

Closed ghost closed 9 years ago

ghost commented 9 years ago

How to use the options.....for example: shortName:

dir.subdirs(path, { shortName: true}, function(err, subdirs) { if (err) throw err; console.log(subdirs); });

Don't work......matchDir: 'name' ....Don't work

fshost commented 9 years ago

The subdirs method does not have an options parameter as you can easily sort and/or filter the array of subdirs returned using native Array methods. There are examples of this for the files method in the readme but they would also apply to subdirs, e.g. subdirs.sort(), subdirs.filter(yourFunction), etc.