framework/RedKiteCms/Content/BlockManager/BlockManagerMove.php
private function moveArchiveDir($archiveSourceFile, $archiveTargetFile, $blockName, $slotName)
    {
        if (!is_dir($archiveSourceFile)) {
            return;
        }

        $this->filesystem->mirror($archiveSourceFile, $archiveTargetFile);
        $this->filesystem->remove($archiveSourceFile);

        $historyChanged = array();
        $historyFile = $archiveTargetFile . '/history.json';
        $history = json_decode(file_get_contents($historyFile), true);
        foreach($history as $key => $values) {
            $values["name"] = $blockName;
            $values["slot_name"] = $slotName;
            $historyChanged[$key] = $values;
        }
        file_put_contents($historyFile, json_encode($historyChanged));
    }
private function moveArchiveDir($archiveSourceFile, $archiveTargetFile, $blockName, $slotName)
    {
        if (!is_dir($archiveSourceFile)) {
            return;
        }

        $this->filesystem->mirror($archiveSourceFile, $archiveTargetFile);
        $this->filesystem->remove($archiveSourceFile);

        $historyChanged = array();
        $historyFile = $archiveTargetFile . '/history.json';
        $history = json_decode(file_get_contents($historyFile), true);
        foreach($history as $key => $values) {
            $values["name"] = $blockName;
            $values["slot_name"] = $slotName;
            $historyChanged[$key] = $values;
        }
        file_put_contents($historyFile, json_encode($historyChanged));
    }
Moves the block's archive dir to the new slot and adapts it according with the new block name

@param string $archiveSourceFile
@param string $archiveTargetFile
@param string $blockName
@param string $slotName