Add fs.join

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-01-05 12:01:55 -08:00
parent 1c24ad0fdd
commit 5293ba7469
2 changed files with 11 additions and 0 deletions

View File

@@ -35,6 +35,11 @@ module.exports =
exists: (path) ->
OSX.NSFileManager.defaultManager.fileExistsAtPath_isDirectory path, null
join: (paths...) ->
return paths[0] if paths.length == 1
[first, rest...] = paths
first.replace(/\/?$/, "/") + @join(rest...)
# Returns true if the file specified by path exists and is a
# directory.
isDirectory: (path) ->