rename listFiles to list

This commit is contained in:
Corey Johnson
2012-02-27 13:42:54 -08:00
parent 58259b009d
commit 71cab248cf
3 changed files with 5 additions and 5 deletions

View File

@@ -29,9 +29,9 @@ describe "fs", ->
fs.async.listTree(directoryPath).done (result) ->
expect(result).toEqual fs.listTree(directoryPath)
describe ".listFiles(directoryPath)", ->
describe ".list(directoryPath)", ->
it "returns a promise that resolves to the contents of that directory", ->
waitsForPromise ->
fs.async.listFiles(directoryPath).done (result) ->
fs.async.list(directoryPath).done (result) ->
expect(result).toEqual fs.list(directoryPath)

View File

@@ -11,8 +11,8 @@ class Project
getFilePaths: ->
projectUrl = @url
fs.async.listFiles(@url, true).pipe (urls) ->
url.replace(projectUrl, "") for url in urls
fs.async.listTree(@url).pipe (urls) ->
url.replace(projectUrl, "") for url in urls when fs.isFile(url)
open: (filePath) ->
filePath = @resolve filePath

View File

@@ -67,7 +67,7 @@ module.exports =
$native.write(path, content)
async:
listFiles: (path) ->
list: (path) ->
deferred = $.Deferred()
$native.asyncList path, false, (subpaths) ->
deferred.resolve subpaths