Comparing version 0.0.5 to 0.0.7
{ | ||
"name": "walkdir", | ||
"description": "Find files simply. Walks a directory tree emitting events based on what it finds. Presents a familliar callback/emitter/a+sync interface. Walk a tree of any depth.", | ||
"version": "0.0.5", | ||
"version": "0.0.7", | ||
"author": "Ryan Day <soldair@gmail.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
[![Build Status](https://secure.travis-ci.org/soldair/node-walkdir.png)](http://travis-ci.org/soldair/node-walkdir) | ||
## walkdir | ||
@@ -4,0 +4,0 @@ |
var EventEmitter = require('events').EventEmitter, | ||
fs = require('fs'), | ||
_path = require('path'); | ||
_path = require('path'), | ||
sep = _path.sep||'/';// 0.6.x | ||
module.exports = walkdir; | ||
@@ -9,6 +11,7 @@ | ||
walkdir.sync = function(file,options){ | ||
walkdir.sync = function(path,options,cb){ | ||
if(typeof options == 'function') cb = options; | ||
options = options || {}; | ||
options.sync = true; | ||
return walkdir(file,options); | ||
return walkdir(path,options,cb); | ||
@@ -124,5 +127,5 @@ }; | ||
if(path == '/') path=''; | ||
if(path == sep) path=''; | ||
for(var i=0,j=files.length;i<j;i++){ | ||
statter(path+'/'+files[i],false,(depth||0)+1); | ||
statter(path+sep+files[i],false,(depth||0)+1); | ||
} | ||
@@ -129,0 +132,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21187
493