Add native traverseTree

This commit is contained in:
Kevin Sawicki
2012-10-08 20:17:09 -07:00
parent 7b4e798a4d
commit 51a41a9a72
4 changed files with 61 additions and 33 deletions

View File

@@ -103,13 +103,7 @@ module.exports =
@makeDirectory(path)
traverseTree: (rootPath, fn) ->
recurse = null
prune = -> recurse = false
for path in @list(rootPath)
recurse = true
fn(path, prune)
@traverseTree(path, fn) if recurse and @isDirectory(path)
$native.traverseTree(rootPath, fn)
lastModified: (path) ->
$native.lastModified(path)