klyn.io.Files.searchText
method
public static searchText(notnull path as Path, notnull pattern as String, options as SearchOptions = null) as ArrayList<SearchMatch>
Description

Collects text occurrences in one file or directory using Path's engine.

Parameters
ParameterDescription
pathSearch root. @param pattern Literal text or configured regex.
optionsSettings; null selects defaults.
Returns

Search results. @throws IOException on read/decode failure.

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

hits = Files.searchText(Path("src"), "TODO")