searchAndReplace method
Search the content of files in a root path for a RegExp pattern and replace it.
Implementation
Future<
Map<
String,
List<
(
int matchLine,
String lineContent,
Map<int, String> matchPositions
)>>> searchAndReplace(String rootPath, RegExp pattern,
{bool ignoreHidden = true,
List<RegExp> excluded = const [],
List<RegExp> allowed = const [],
String? replacement}) async =>
await searchFilesContent(rootPath.replaceSeparator(), pattern,
ignoreHidden: ignoreHidden,
excluded: excluded,
allowed: allowed,
replacement: replacement);