We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 908051c commit 754f6bbCopy full SHA for 754f6bb
test/test-walk.js
@@ -2,13 +2,24 @@
2
"use strict";
3
4
var walk = require('../lib/walk').walk
5
+ , path = require('path')
6
+ , dirname = process.argv[2] || './'
7
, walker
8
;
9
- walker = walk('./');
10
+ walker = walk(dirname);
11
+
12
+ walker.on('directory', function (root, stat, next) {
13
+ console.log('[d]', path.join(root, stat.name));
14
+ next();
15
+ });
16
17
walker.on('file', function (root, stat, next) {
- console.log(root, stat.name);
18
+ console.log('[f]', path.join(root, stat.name));
19
next();
20
});
21
22
+ walker.on('end', function () {
23
+ console.log('All Done!');
24
25
}());
0 commit comments