findFilesInDir method
Implementation
List<File> findFilesInDir(Directory dir) {
final files = <File>[];
for (final entity in dir.listSync()) {
if (entity is File) {
files.add(entity);
} else if (entity is Directory) {
files.addAll(findFilesInDir(entity));
}
}
return files;
}