<?php throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target);
}
if (true !== @rename($origin, $target)) {
if (is_dir($origin)) {
$this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);