parsePatterns method
Implementation
Future<List<String>> parsePatterns(Directory directory,
{bool includeGitIgnore = true}) async {
final List<String> patterns = [];
final hooksIgnore = File(join(directory.path, kHooksIgnore));
if (await hooksIgnore.exists()) {
patterns.addAll(await hooksIgnore.readAsLines());
}
if (includeGitIgnore) {
final gitIgnore = File(join(directory.path, kGitIgnore));
if (await gitIgnore.exists()) {
patterns.addAll(await gitIgnore.readAsLines());
}
}
return patterns;
}