klyn.io.Files.searchText
method
public static searchText(notnull path as Path, notnull pattern as String, options as SearchOptions, notnull consumer as (SearchMatch) -> Boolean) as ULong
Description

Streams results through Path's engine. False cancels all workers.

Parameters
ParameterDescription
pathSearch root. @param pattern Search pattern.
optionsSettings. @param consumer Serialized result callback.
Returns

Delivered count. @throws IOException on read/decode failure.

Throws
  • NullException if path, pattern, consumer is null at runtime; statically null arguments are rejected with TypeError.
Example

Files.searchText(Path.cwd, "TODO", SearchOptions(), lambda(hit): false)