public function clearTemporaryFilesAction()
{
$this->checkPermission("clear_temp_files");
// public files
recursiveDelete(PIMCORE_TEMPORARY_DIRECTORY, false);
// system files
recursiveDelete(PIMCORE_SYSTEM_TEMP_DIRECTORY, false);
// recreate .dummy files # PIMCORE-2629
\Pimcore\File::put(PIMCORE_TEMPORARY_DIRECTORY . "/.dummy", "");
\Pimcore\File::put(PIMCORE_SYSTEM_TEMP_DIRECTORY . "/.dummy", "");
\Pimcore::getEventManager()->trigger("system.cache.clearTemporaryFiles", $this);
$this->_helper->json(["success" => true]);
}