function _pm_update_move_files

8.0.x updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)
6.x updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)
7.x updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)
3.x updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)
4.x updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)
5.x updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)
master updatecode.pm.inc _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE)

Move some files from one location to another.

2 calls to _pm_update_move_files()
drush_pm_updatecode_rollback in commands/pm/updatecode.pm.inc
Rollback the update process.
_pm_update_core in commands/pm/updatecode.pm.inc
Update drupal core, following interactive confirmation from the user.

File

commands/pm/updatecode.pm.inc, line 221
pm-updatecode command implementation.

Code

function _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE) {
  $items_to_move = drush_scan_directory($src_dir, '/.*/', array_merge(array('.', '..'), $skip_list), 0, FALSE, 'filename', 0, TRUE);
  foreach ($items_to_move as $filename => $info) {
    if ($remove_conflicts) {
      drush_delete_dir($dest_dir . '/' . basename($filename));
    }
    if (!file_exists($dest_dir . '/' . basename($filename))) {
      $move_result = drush_move_dir($filename, $dest_dir . '/' . basename($filename));
    }
  }
  return TRUE;
}