Mock the `rpoplpush` command
@see https://redis.io/commands/rpoplpush
@param string $sourceList
@param string $destinationList
@return RedisMock
975247
public function rpoplpush(string $sourceList, string $destinationList)
    {
        // RPOP (get last value of the $sourceList)
        $rpopValue = $this->rpop($sourceList);

        // LPUSH (send the value at the end of the $destinationList)
        if (null !== $rpopValue){
            $this->lpush($destinationList, $rpopValue);
        }

        // return the rpop value;
        return $rpopValue;
    }
223298
public function copy($sourcePath, $destinationPath)
    {
        $sourceNode = $this->getNodeForPath($sourcePath);

        // grab the dirname and basename components
        list($destinationDir, $destinationName) = Uri\split($destinationPath);

        $destinationParent = $this->getNodeForPath($destinationDir);
        // Check if the target can handle the copy itself. If not, we do it ourselves.
        if (!$destinationParent instanceof ICopyTarget || !$destinationParent->copyInto($destinationName, $sourcePath, $sourceNode)) {
            $this->copyNode($sourceNode, $destinationParent, $destinationName);
        }

        $this->markDirty($destinationDir);
    }
236781
public function call($hostname, $source, $destination, array $config = [])
    {
        $defaults = [
            'timeout' => null,
            'options' => [],
        ];
        $config = array_merge($defaults, $config);

        $escapedSource = escapeshellarg($source);
        $escapedDestination = escapeshellarg($destination);
        $rsync = "rsync -azP " . implode(' ', $config['options']) . " $escapedSource $escapedDestination";

        $this->pop->command($hostname, $rsync);

        $process = new Process($rsync);
        $process
            ->setTimeout($config['timeout'])
            ->mustRun($this->pop->callback($hostname));
    }
1083506
function rpoplpush(source, destination, req) {
  var src = this.getKey(source, req)
    , dest = this.getKey(destination, req)
    , element;
  if(src === undefined) return null;
  if(dest === undefined) {
    dest = new List();
    this.setKey(destination, dest, undefined, undefined, undefined, req);
  }
  element = src.rpop();
  if(src.llen() === 0) {
    this.delKey(source, req);
  }
  dest.lpush([element]);
  return element;
}
882822
public function pfMerge($destinationKey, $sourceKey, ...$sourceKeys) {
        return $this->send(array_merge(['pfmerge', $destinationKey], (array) $sourceKey, $sourceKeys));
    }
1171724
public function synchronize(SubscriberListInterface $list)
    {
        $listData = $this->listRepository->findById($list->getListId());

        // get Subscribers from the provider
        $subscribers = $list->getProvider()->getSubscribers();

        // unsubscribe difference
        $this->unsubscribeDifference($list->getListId(), $subscribers);
        // subscribe the rest
        return $this->batchSubscribe($list->getListId(), $subscribers);
    }
184855
public function move(string $sourceInterface, string $sourceName, string $targetInterface, string $targetName)
    {
        $sourceIndex = $sourceInterface . '-' . $sourceName;
        if (! isset($this->container[$sourceIndex])) {
            throw $this->unbound($sourceIndex);
        }
        $targetIndex = $targetInterface . '-' . $targetName;
        $this->container[$targetIndex] = $this->container[$sourceIndex];
        unset($this->container[$sourceIndex]);
    }
756083
def aot_rpush(self, exit_code):
        """"""
        if self.tcex.default_args.tc_playbook_db_type == 'Redis':
            try:
                self.db.rpush(self.tcex.default_args.tc_exit_channel, exit_code)
            except Exception as e:
                self.tcex.exit(1, 'Exception during AOT exit push ({}).'.format(e))
150305
protected function doGet($sourceFile, $destinationFile)
    {
        $connection = $this->connection;
        $ftpMode = $this->getParam('transfer_mode');
        $createMask = $this->getParam('create_mask');

        return $this->retry(function () use ($connection, $destinationFile, $sourceFile, $ftpMode, $createMask) {
            $localDir = dirname($destinationFile);

            if (!file_exists($localDir)) {
                mkdir($localDir, $createMask, true);
            }

            $res = @ftp_get($connection, $destinationFile, $sourceFile, $ftpMode);

            if (false === $res) {
                throw new \RuntimeException("Couldn't copy file: ".$sourceFile);
            }
        });
    }
363409
public function copy($source, $destination)  
    {
        Eden_Array_Argument::i()
            //argument 1 must be a string
            ->test(1, 'string')  
            //argument 2 must be a string
            ->test(2, 'string'); 

        $this->data[$destination] = $this->data[$source];
        return $this;
    }
942110
def rpoplpush(self, sourcekey, destkey, *, encoding=_NOTSET):
        
        return self.execute(b'RPOPLPUSH', sourcekey, destkey,
                            encoding=encoding)
776418
public function pack($source, $destination, $skipRoot = false)
    {
        $this->_setSkipRoot($skipRoot);
        $source = realpath($source);
        $tarData = $this->_setCurrentPath($source)
            ->_setDestinationFilePath($destination)
            ->_setCurrentFile($source);

        $this->_initWriter();
        $this->_createTar($skipRoot, true);
        $this->_destroyWriter();

        return $destination;
    }
624708
public static LoadJobConfiguration of(TableId destinationTable, List<String> sourceUris) {
    return newBuilder(destinationTable, sourceUris).build();
  }
849631
private function extract(string $sourceFile, string $destinationDir): self
    {
        $p = new \PharData($sourceFile);
        $p->extractTo($destinationDir);

        return $this;
    }
1102431
public function insertEntryList(EntryList $list)
    {
        $list = clone $list;
        $this->writer->insertAll($this->projectList($list));
    }
839675
public function getManipulatedData(GridField $gridField, SS_List $dataList)
    {
        $state = $gridField->State->MockDataGenerator;
        $count = (string) $state->Count;
        if (!$count) {
            return $dataList;
        }
        $generator = new MockDataBuilder($gridField->getModelClass());
        $ids = $generator
            ->setCount($count)
            ->setIncludeRelations($state->IncludeRelations)
            ->setDownloadImages($state->DownloadImages === true)
            ->generate();

        foreach ($ids as $id) {
            $dataList->add($id);
        }

        return $dataList;
    }
404825
public static function copyRecursive($source, $destination)
    {
        if (!is_dir($destination)) {
            mkdir($destination);
        }

        $dir = opendir($source);

        if (!$dir) {
            throw new RuntimeException("Cannot copy '$source' to '$destination'");
        }

        while (false !== ($file = readdir($dir))) {
            if ($file != '.' && $file != '..') {
                if (is_dir($source . DIRECTORY_SEPARATOR . $file)) {
                    static::copyRecursive(
                        $source . DIRECTORY_SEPARATOR . $file,
                        $destination . DIRECTORY_SEPARATOR . $file
                    );
                } else {
                    copy($source . DIRECTORY_SEPARATOR . $file, $destination . DIRECTORY_SEPARATOR . $file);
                }
            }
        }
        closedir($dir);
    }