public searchText(notnull pattern as String, options as SearchOptions, notnull consumer as (SearchMatch) -> Boolean) as ULong
Streams matches through a serialized callback, without collecting them. Returning false cancels all workers. File order is unspecified with more than one worker; callbacks run on workers in that case. Do not mutate options during the search.
| Parameter | Description |
|---|---|
pattern | Search pattern. |
options | Settings. |
consumer | Receives each match; false stops the search. |
Number of delivered matches.
count = Path.cwd.searchText("TODO", SearchOptions(), lambda(hit): false)