walkdir
Advanced tools
Comparing version 0.3.2 to 0.4.0
{ | ||
"name": "walkdir", | ||
"description": "Find files simply. Walks a directory tree emitting events based on what it finds. Presents a familiar callback/emitter/a+sync interface. Walk a tree of any depth.", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"author": "Ryan Day <soldair@gmail.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -104,3 +104,2 @@ var EventEmitter = require('events').EventEmitter, | ||
//if i have evented this inode already dont again. | ||
@@ -144,2 +143,3 @@ var fileName = _path.basename(path); | ||
},readdir = function(path,stat,depth){ | ||
if(!resolved) { | ||
@@ -183,3 +183,3 @@ path = _path.resolve(path); | ||
if(!res){ | ||
throw new Error('option.filter funtion must return a array of strings or a promise') | ||
throw new Error('option.filter function must return a array of strings or a promise') | ||
} | ||
@@ -212,3 +212,3 @@ // support filters that return a promise | ||
files = fs.readdirSync(path); | ||
} catch (e) { } | ||
} catch (_e) { e = _e} | ||
@@ -269,3 +269,3 @@ readdirAction(e,files); | ||
if(path == _path) { | ||
emitter.emit('error',path,err); | ||
emitter.emit('error',new Error('error reading first path in the walk '+path+'\n'+err),err); | ||
} | ||
@@ -272,0 +272,0 @@ }); |
41062
41
942