private function copyFile($source, $destination, $override) { if (file_exists($destination) && !$override) { return false; } $filePath = dirname($destination); if (!is_dir($filePath)) { mkdir($filePath); } return copy($source, $destination); }