Document and test the cancel() method on the object returned by atom.workspace.scan().

This commit is contained in:
Michael Bolin
2015-06-02 19:14:02 -04:00
parent 10d9111f68
commit 5fc9d9e01a
2 changed files with 33 additions and 1 deletions

View File

@@ -803,7 +803,8 @@ class Workspace extends Model
# * `onPathsSearched` (optional) {Function}
# * `iterator` {Function} callback on each file found
#
# Returns a `Promise`.
# Returns a *thenable* object with a `cancel()` method that will cancel all
# of the underlying searches that were started as part of this scan.
scan: (regex, options={}, iterator) ->
if _.isFunction(options)
iterator = options