mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
rename listFiles to list
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user