function drush_content_synchronizer_clean_temporary_files in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 content_synchronizer.drush.inc \drush_content_synchronizer_clean_temporary_files()
Delete temporary files.
File
- ./
content_synchronizer.drush.inc, line 96 - Drush commands for content_synchronizer module.
Code
function drush_content_synchronizer_clean_temporary_files() {
$path = \Drupal::service('file_system')
->realpath(ExportEntityWriter::GENERATOR_DIR);
foreach (glob($path . '/*') as $file) {
if (is_dir($file)) {
file_unmanaged_delete_recursive($file);
}
}
}