Beispiel #1
0
 public function copy($path, $newpath)
 {
     $path = $this->applyPathPrefix($path);
     $newpath = $this->applyPathPrefix($newpath);
     $this->client->copyBlob($this->container, $newpath, $this->container, $path);
     return true;
 }
 public function copy($path, $newpath)
 {
     // Prefix the path
     $path = $this->applyPathPrefix($path);
     // Prefix the new path
     // TODO: should we attempt to prefix the $newpath here?
     $newpath = $this->applyPathPrefix($newpath);
     /** @var CopyBlobResult $result */
     $this->client->copyBlob($this->container, $newpath, $this->container, $path);
     return true;
 }
Beispiel #3
0
 /**
  * {@inheritDoc}
  */
 public function rename($sourceKey, $targetKey)
 {
     $this->init();
     try {
         $this->blobProxy->copyBlob($this->containerName, $targetKey, $this->containerName, $sourceKey);
         $this->blobProxy->deleteBlob($this->containerName, $sourceKey);
         return true;
     } catch (ServiceException $e) {
         $this->failIfContainerNotFound($e, sprintf('rename key "%s"', $sourceKey));
         return false;
     }
 }
 public function copy($path, $newpath)
 {
     $this->client->copyBlob($this->container, $newpath, $this->container, $path);
     return true;
 }
 public function copy($path, $newpath)
 {
     /** @var CopyBlobResult $result */
     $this->client->copyBlob($this->container, $newpath, $this->container, $path);
     return true;
 }
 /**
  * @param \Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface $blobProxyFactory
  * @param \WindowsAzure\Blob\Internal\IBlob                             $blobProxy
  */
 public function it_should_not_mask_exception_when_rename($blobProxyFactory, $blobProxy)
 {
     $blobProxy->copyBlob('containerName', 'filename2', 'containerName', 'filename1')->shouldBeCalled()->willThrow(new \RuntimeException('rename'));
     $blobProxyFactory->create()->shouldBeCalled()->willReturn($blobProxy);
     $this->shouldThrow(new \RuntimeException('rename'))->duringRename('filename1', 'filename2');
 }