Add fs.makeTree

This commit is contained in:
Corey Johnson
2012-07-03 14:46:45 -07:00
parent fc660c2790
commit 4cf4456635
2 changed files with 16 additions and 0 deletions

View File

@@ -93,6 +93,14 @@ module.exports =
makeDirectory: (path) ->
$native.makeDirectory(path)
# Creates the directory specified by "path" including any missing parent
# directories.
makeTree: (path) ->
return unless path
if not @exists(path)
@makeTree(@directory(path))
@makeDirectory(path)
traverseTree: (rootPath, fn) ->
recurse = null
prune = -> recurse = false