public static buildBatchMove ( $source_bucket, $key_pairs, $target_bucket ) |
public static function buildBatchMove($source_bucket, $key_pairs, $target_bucket)
{
return self::twoKeyBatch('move', $source_bucket, $key_pairs, $target_bucket);
}
public function testBatchMove() { $key = 'movefrom' . rand(); $this->bucketManager->copy($this->bucketName, $this->key, $this->bucketName, $key); $key2 = $key . 'to'; $ops = BucketManager::buildBatchMove($this->bucketName, array($key => $key2), $this->bucketName); list($ret, $error) = $this->bucketManager->batch($ops); $this->assertEquals(200, $ret[0]['code']); $error = $this->bucketManager->delete($this->bucketName, $key2); $this->assertNull($error); }