mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Dir.list only goes one level deep unless you ask it to go deeper
This commit is contained in:
parent
488697884f
commit
22649889fb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user