From 6b66729f5d37d516e41c98f393a90441d54e77fb Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 12 Feb 2011 13:42:06 -0800 Subject: [PATCH] fixed errors in example --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a5075c6..3076763 100644 --- a/README.md +++ b/README.md @@ -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(); });