src/Update/Updater.php
public function moveFile($source, $target, $overwrite = FALSE) {
    $source_path = $this->getRepoRoot() . '/' . $source;
    $target_path = $this->getRepoRoot() . '/' . $target;

    if ($this->getFileSystem()->exists($source)) {
      if ($overwrite) {
        $this->getFileSystem()->rename($source_path, $target_path, TRUE);
      }
      // We "fail" silently if target file already exists. The default behavior
      // is quiet and non-destructive.
      elseif (!$this->getFileSystem()->exists($target_path)) {
        $this->getFileSystem()->rename($source_path, $target_path);
      }
    }

    return FALSE;
  }
public function moveFile($source, $target, $overwrite = FALSE) {
    $source_path = $this->getRepoRoot() . '/' . $source;
    $target_path = $this->getRepoRoot() . '/' . $target;

    if ($this->getFileSystem()->exists($source)) {
      if ($overwrite) {
        $this->getFileSystem()->rename($source_path, $target_path, TRUE);
      }
      // We "fail" silently if target file already exists. The default behavior
      // is quiet and non-destructive.
      elseif (!$this->getFileSystem()->exists($target_path)) {
        $this->getFileSystem()->rename($source_path, $target_path);
      }
    }

    return FALSE;
  }
public function moveFile ( $ source , $ target , $ overwrite = FALSE ) { $ source_path = $ this -> getRepoRoot ( ) . '/' . $ source ; $ target_path = $ this -> getRepoRoot ( ) . '/' . $ target ; if ( $ this -> getFileSystem ( ) -> exists ( $ source ) ) { if ( $ overwrite ) { $ this -> getFileSystem ( ) -> rename ( $ source_path , $ target_path , TRUE ) ; } // We "fail" silently if target file already exists. The default behavior // is quiet and non-destructive. elseif ( ! $ this -> getFileSystem ( ) -> exists ( $ target_path ) ) { $ this -> getFileSystem ( ) -> rename ( $ source_path , $ target_path ) ; } } return FALSE ; }
Moves a file from one location to another, relative to repo root.

@param string $source
The source filepath, relative to the repository root.
@param string $target
The target filepath, relative to the repository root.

@return bool
FALSE if nothing happened.
Moves a file from one location to another relative to repo root .