wiostream
Stream filepaths from a directory tree
This is BETA.
Usage
var wiostream = ; /** * @param * @param * @param * * @returns * "cancel" event before "end" * If walk ends before cancelWalk() * is called "cancel" will not emitted. */var stream = ; // stream.cancelWalk() is available// to cancel walk then emit "cancel" event before "end"// If walk ends before cancelWalk() is called then// the "cancel" event will not emitted // sample descent controller { var excludeDir = /^\.|node_modules/; var atMaxDepth = depth === 2; // skip dot-directories and node_modules // and don't go more than 2 levels deep excludeDir || atMaxDepth ? : ;}
Output:
got filepath: package.jsongot filepath: index.jsgot filepath: README.mdgot filepath: .npmignoregot filepath: .gitignorewalk complete