From 09ba753b802605a50ec02d46d7f712ac80ad6804 Mon Sep 17 00:00:00 2001 From: ZECTBynmo Date: Thu, 18 Apr 2013 23:03:35 -0400 Subject: [PATCH] Add path filters to options --- lib/walk.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/walk.js b/lib/walk.js index 5209198..8e34fd8 100644 --- a/lib/walk.js +++ b/lib/walk.js @@ -35,6 +35,7 @@ me._wq = []; me._wqueue = [me._wq]; me._wcurpath = undefined; + me._wasyncFilters = options.asyncFilters; me._wfirstrun = true; me._wcurpath = pathname; @@ -187,6 +188,17 @@ var me = this ; + // Stop directories that contain filter keywords + // from continuing through the walk process + if (me._wasyncFilters != undefined) { + var shouldExclude = false; + for (var iFilter=0; iFilter