Rename traverseTree to traverseTreeSync

Also rename traverseTreeAsync to traverseTree
This commit is contained in:
Kevin Sawicki
2013-03-13 14:39:19 -07:00
parent 8fe9e31c08
commit 8dbcb44d06
5 changed files with 13 additions and 13 deletions

View File

@@ -92,7 +92,7 @@ module.exports =
onPath = (path) =>
paths.push(@join(rootPath, path))
false
@traverseTree(rootPath, onPath, onPath)
@traverseTreeSync(rootPath, onPath, onPath)
paths
listTree: (rootPath) ->
@@ -100,7 +100,7 @@ module.exports =
onPath = (path) =>
paths.push(@join(rootPath, path))
true
@traverseTree(rootPath, onPath, onPath)
@traverseTreeSync(rootPath, onPath, onPath)
paths
move: (source, target) ->
@@ -152,7 +152,7 @@ module.exports =
@makeTree(@directory(path))
@makeDirectory(path)
traverseTree: (rootPath, onFile, onDirectory) ->
traverseTreeSync: (rootPath, onFile, onDirectory) ->
return unless @isDirectory(rootPath)
traverse = (rootPath, prefix, onFile, onDirectory) =>
@@ -168,7 +168,7 @@ module.exports =
traverse(rootPath, '', onFile, onDirectory)
traverseTreeAsync: (rootPath, onFile, onDirectory, onDone) ->
traverseTree: (rootPath, onFile, onDirectory, onDone) ->
pathCounter = 0
startPath = -> pathCounter++
endPath = -> onDone() if --pathCounter is 0