Added exists

This commit is contained in:
Corey Johnson
2011-09-14 11:41:04 -07:00
parent 5f44dad5c2
commit 7765fd06a8

View File

@@ -20,6 +20,11 @@ module.exports =
changeWorkingDirectory: (path) ->
OSX.NSFileManager.defaultManager.changeCurrentDirectoryPath path
# Returns true if the file specified by path exists
exists: (path) ->
exists = OSX.NSFileManager.defaultManager.
fileExistsAtPath_isDirectory path, null
# Returns true if the file specified by path exists and is a
# directory.
isDirectory: (path) ->
@@ -70,4 +75,4 @@ module.exports =
# Return the path name of the current working directory.
workingDirectory: ->
OSX.NSFileManager.defaultManager.currentDirectoryPath.toString()
OSX.NSFileManager.defaultManager.currentDirectoryPath.toString()