Beispiel #1
0
 /**
  * Moves the file to a new location.
  *
  * @param string $newPath
  */
 public function move($newPath)
 {
     if (!$this->moved) {
         if (!move_uploaded_file($this->getPath(), $newPath)) {
             throw new FileException(sprintf('Could not move file %s to %s', $this->getPath(), $newPath));
         }
         $this->moved = true;
     } else {
         parent::move($newPath);
     }
 }