function _drush_delete_registered_files

8.0.x filesystem.inc _drush_delete_registered_files()
6.x filesystem.inc _drush_delete_registered_files()
7.x filesystem.inc _drush_delete_registered_files()
3.x drush.inc _drush_delete_registered_files()
4.x drush.inc _drush_delete_registered_files()
5.x filesystem.inc _drush_delete_registered_files()
master filesystem.inc _drush_delete_registered_files()

Delete all of the registered temporary files.

Related topics

1 call to _drush_delete_registered_files()
drush_core_runserver in commands/runserver/runserver.drush.inc
Callback for runserver command.
1 string reference to '_drush_delete_registered_files'
drush_register_file_for_deletion in includes/filesystem.inc
Any file passed in to this function will be deleted when drush exits.

File

includes/filesystem.inc, line 543
Filesystem utilities.

Code

function _drush_delete_registered_files() {
  $files_to_delete = drush_register_file_for_deletion();

  foreach ($files_to_delete as $file) {
    // We'll make sure that the file still exists, just
    // in case someone came along and deleted it, even
    // though they did not need to.
    if (file_exists($file)) {
      if (is_dir($file)) {
        drush_delete_dir($file, TRUE);
      }
      else {
        @chmod($file, 0777); // Make file writeable
        unlink($file);
      }
    }
  }
}