By kim.pepper on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.8.x
Introduced in version:
8.8.0
Issue links:
Description:
file_scan_directory is deprecated and has been moved to the file_system service.
Before:
$files = file_scan_directory($directory);
After
if (is_dir($directory)) {
$files = \Drupal::service('file_system')->scanDirectory($directory);
}
When possible, you should inject the FileSystemInterface into your constructor.
Impacts:
Module developers