public function copyDir($source, $destination)
{
if ($this->exists($source) && !$this->isDir($source)) {
throw new WriteException("Directory {$source} could not be copied to {$destination}.");
}
if ($this->exists($destination)) {
throw new WriteException("Directory {$source} could not be copied to {$destination}.");
}
$this->ensuredCopyDir($source, $destination);
}