mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Rename list() to listSync()
This commit is contained in:
@@ -66,14 +66,14 @@ module.exports =
|
||||
|
||||
# Returns an array with all the names of files contained
|
||||
# in the directory path.
|
||||
list: (rootPath, extensions) ->
|
||||
listSync: (rootPath, extensions) ->
|
||||
return [] unless @isDirectorySync(rootPath)
|
||||
paths = fs.readdirSync(rootPath)
|
||||
paths = @filterExtensions(paths, extensions) if extensions
|
||||
paths = paths.map (path) -> Path.join(rootPath, path)
|
||||
paths
|
||||
|
||||
listAsync: (rootPath, rest...) ->
|
||||
list: (rootPath, rest...) ->
|
||||
extensions = rest.shift() if rest.length > 1
|
||||
done = rest.shift()
|
||||
fs.readdir rootPath, (err, paths) =>
|
||||
|
||||
Reference in New Issue
Block a user