mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Spec passes for fs.async.list.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# http://ringojs.org/api/v0.8/fs/
|
||||
|
||||
_ = require 'underscore'
|
||||
|
||||
$ = require 'jquery'
|
||||
jscocoa = require 'jscocoa'
|
||||
|
||||
module.exports =
|
||||
@@ -97,6 +97,9 @@ module.exports =
|
||||
OSX.NSFileManager.defaultManager.currentDirectoryPath.toString()
|
||||
|
||||
async:
|
||||
list: (path, callback) ->
|
||||
$atomController.contentsOfDirectoryAtPath_onComplete(path, callback)
|
||||
list: (path) ->
|
||||
deferred = $.Deferred()
|
||||
$atomController.contentsOfDirectoryAtPath_onComplete path, (result) ->
|
||||
deferred.resolve ("#{path}/#{subpath}" for subpath in result)
|
||||
deferred
|
||||
|
||||
|
||||
Reference in New Issue
Block a user