mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Dir.list only goes one level deep unless you ask it to go deeper
This commit is contained in:
@@ -129,10 +129,14 @@ File =
|
||||
exists and not isDir.valueOf()
|
||||
|
||||
Dir =
|
||||
list: (path) ->
|
||||
list: (path, recursive) ->
|
||||
path = File.expand path
|
||||
_.map OSX.NSFileManager.defaultManager.subpathsAtPath(path), (entry) ->
|
||||
"#{path}/#{entry}"
|
||||
fm = OSX.NSFileManager.defaultManager
|
||||
if recursive
|
||||
paths = fm.subpathsAtPath path
|
||||
else
|
||||
paths = fm.contentsOfDirectoryAtPath_error path, null
|
||||
_.map paths, (entry) -> "#{path}/#{entry}"
|
||||
isDir: (path) ->
|
||||
isDir = new outArgument
|
||||
exists = OSX.NSFileManager.defaultManager.fileExistsAtPath_isDirectory(path, isDir)
|
||||
|
||||
Reference in New Issue
Block a user