public function clearDestinationLocation($path = '')
{
if ($path == '') {
$path = $this->app->getDestinationLocation();
}
foreach (glob($path . '/*') as $file) {
if (is_dir($file)) {
$this->clearDestinationLocation($file);
} else {
unlink($file);
}
}
if ($path != $this->app->getDestinationLocation()) {
rmdir($path);
}
}