From 71cab248cf66ed9ea3fd2708aacc91c872934948 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Mon, 27 Feb 2012 13:42:54 -0800 Subject: [PATCH] rename listFiles to list --- spec/stdlib/fs-spec.coffee | 4 ++-- src/atom/project.coffee | 4 ++-- src/stdlib/fs.coffee | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/stdlib/fs-spec.coffee b/spec/stdlib/fs-spec.coffee index cac346606..500281ead 100644 --- a/spec/stdlib/fs-spec.coffee +++ b/spec/stdlib/fs-spec.coffee @@ -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) diff --git a/src/atom/project.coffee b/src/atom/project.coffee index df49ea120..d8f65bef4 100644 --- a/src/atom/project.coffee +++ b/src/atom/project.coffee @@ -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 diff --git a/src/stdlib/fs.coffee b/src/stdlib/fs.coffee index 7c0fabe61..f888b0c91 100644 --- a/src/stdlib/fs.coffee +++ b/src/stdlib/fs.coffee @@ -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