/**
  * Rename a file for the given media.
  *
  * @param Media  $media
  * @param string $oldName
  *
  * @return bool
  */
 public function renameFile(Media $media, $oldName)
 {
     $oldFile = $this->getMediaDirectory($media) . '/' . $oldName;
     $newFile = $this->getMediaDirectory($media) . '/' . $media->file_name;
     $this->disk->move($oldFile, $newFile);
     return true;
 }
Beispiel #2
0
 /**
  * Move a file to a new location.
  *
  * @param  string $from
  * @param  string $to
  *
  * @return bool
  */
 public function move($from, $to)
 {
     $from = $this->getPathPrefix($from);
     $to = $this->getPathPrefix($to);
     return $this->drive->move($from, $to);
 }
 /**
  * @param $from
  * @param $to
  * @return bool|mixed
  */
 public function move($from, $to)
 {
     return $this->storage->move($from, $to);
 }