moveItem() public method

Move item
public moveItem ( string $src, string $dest ) : void
$src string
$dest string
return void
Example #1
0
 /**
  * Move item
  *
  * @param string $src
  * @param string $dest
  * @return void
  * @throws InvalidArgumentException
  */
 public function moveItem($src, $dest)
 {
     try {
         $name = basename($src);
         $this->storage->moveItem($src, $dest);
         $this->repository->updateKey($src, "{$dest}/{$name}");
     } catch (\InvalidArgumentException $e) {
         throw new \InvalidArgumentException(sprintf("Can't move file %s.", $name), $e->getCode(), $e);
     }
 }