diff --git a/src/fs.coffee b/src/fs.coffee index 17d8bb3af..1a0242e7f 100644 --- a/src/fs.coffee +++ b/src/fs.coffee @@ -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() \ No newline at end of file + OSX.NSFileManager.defaultManager.currentDirectoryPath.toString()