Spec passes for fs.async.list.

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-01-03 14:03:03 -07:00
parent d076b1a48c
commit 3822549007
4 changed files with 17 additions and 19 deletions

View File

@@ -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