Esempio n. 1
0
 /**
  * Renames a file or directory
  *
  * @param File $destination
  *
  * @return bool
  */
 public function moveTo($file, File $destination)
 {
     if ($destination->getFilesystem() == $this) {
         // TODO: invalidate cache?
         return $this->ftpRename($file, $destination);
     } else {
         return Util::streamCopy($file, $destination) && $file->delete();
     }
 }