/** * Copy an item in the storage service to a given path. * * @param string $sourcePath * @param string $destination path * @param array $options * @return void */ public function copyItem($sourcePath, $destinationPath, $options = null) { $this->_rackspace->copyObject($this->_container, $sourcePath, $this->_container, $destinationPath, $options); if (!$this->_rackspace->isSuccessful()) { throw new Zend_Cloud_StorageService_Exception('Error on copy: ' . $this->_rackspace->getErrorMsg()); } }
/** * Copy the object to another container * You can add metadata information to the destination object, change the * content_type and the name of the object * * @param string $container_dest * @param string $name_dest * @param array $metadata * @param string $content_type * @return boolean */ public function copyTo($container_dest, $name_dest, $metadata = array(), $content_type = null) { return $this->service->copyObject($this->container, $this->name, $container_dest, $name_dest, $metadata, $content_type); }
public function testCopyObject() { $result = $this->rackspace->copyObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME, TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME . '-copy'); $this->assertTrue($result); }
public function testCopyObject() { $result = $this->rackspace->copyObject('zf-unit-test', 'zf-object-test', 'zf-unit-test', 'zf-object-test' . '-copy'); $this->assertTrue($result); $this->assertNotContains('application/x-www-form-urlencoded', $this->rackspace->getHttpClient()->getLastRequest()); }
public function testCopyObject() { $result = $this->rackspace->copyObject('zf-unit-test', 'zf-object-test', 'zf-unit-test', 'zf-object-test' . '-copy'); $this->assertTrue($result); }
/** * Copy an cloud file to another cloud file. * * @param string $srcName * @param string $dstName * @return boolean */ public function copyFile($srcName, $dstName, $container = false) { $container = $container ? $container : $this->getGeneralContainer(); return $this->_service->copyObject($container, $srcName, $container, $dstName); }