mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Added exists
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user