cleanIgnored method
Implementation
Future<void> cleanIgnored(Directory directory) async {
await fileHelper.visit(directory, (entity, depth) async {
String relativePath = relative(entity.path, from: directory.path);
if (entity is Directory) {
relativePath = join(relativePath, '.');
}
if (shouldIgnore(relativePath) ||
basename(relativePath) == kHooksIgnore) {
await entity.delete(recursive: true);
}
return true;
});
}