fixed errors in example

This commit is contained in:
AJ ONeal 2011-02-12 13:42:06 -08:00
parent 69d37ac924
commit 6b66729f5d
1 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,8 @@ Installation
Usage
====
var walk = require('walk').walk,
var walk = require('walk'),
fs = require('fs'),
options,
walker;
@ -29,7 +30,7 @@ Usage
followLinks: false,
};
walker = walk("path/to/dir", options);
walker = walk("/tmp", options);
walker.on("names", function (root, nodeNamesArray) {
nodeNames.sort(function (a, b) {
@ -49,7 +50,7 @@ Usage
});
walker.on("file", function (root, fileStats, next) {
fs.readFile(file, function () {
fs.readFile(fileStats.name, function () {
// doStuff
next();
});