Issue #3209141 by Pierre Paul Lefebvre, paulocs: \Drupal::service('file_system')->scanDirectory is not available for Drupal < 8.8