fixed errors in example
This commit is contained in:
parent
69d37ac924
commit
6b66729f5d
|
@ -21,7 +21,8 @@ Installation
|
||||||
Usage
|
Usage
|
||||||
====
|
====
|
||||||
|
|
||||||
var walk = require('walk').walk,
|
var walk = require('walk'),
|
||||||
|
fs = require('fs'),
|
||||||
options,
|
options,
|
||||||
walker;
|
walker;
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@ Usage
|
||||||
followLinks: false,
|
followLinks: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
walker = walk("path/to/dir", options);
|
walker = walk("/tmp", options);
|
||||||
|
|
||||||
walker.on("names", function (root, nodeNamesArray) {
|
walker.on("names", function (root, nodeNamesArray) {
|
||||||
nodeNames.sort(function (a, b) {
|
nodeNames.sort(function (a, b) {
|
||||||
|
@ -49,7 +50,7 @@ Usage
|
||||||
});
|
});
|
||||||
|
|
||||||
walker.on("file", function (root, fileStats, next) {
|
walker.on("file", function (root, fileStats, next) {
|
||||||
fs.readFile(file, function () {
|
fs.readFile(fileStats.name, function () {
|
||||||
// doStuff
|
// doStuff
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue