/** * Deletes a folder and it's files and process DB update * * @param string $path Folder path * @param boolean $getFullErrorLogEntry If set the full error log entry will be returned as array * @return mixed error message or error array * @see tx_dam_tce_file::getLastError() */ function process_deleteFolder($path, $getFullErrorLogEntry = FALSE) { global $TYPO3_CONF_VARS; $error = false; $path = tx_dam::path_makeAbsolute($path); // Init TCE-file-functions object: require_once PATH_txdam . 'lib/class.tx_dam_tce_file.php'; $TCEfile = t3lib_div::makeInstance('tx_dam_tce_file'); $TCEfile->init(); // Processing delete folder $cmd = array(); $cmd['delete']['NONE']['data'] = $path; $TCEfile->setCmdmap($cmd); $log = $TCEfile->process(); if ($TCEfile->errors()) { $error = $TCEfile->getLastError($getFullErrorLogEntry); } if (!$error) { $info = array('target_path' => $path); tx_dam::_callProcessPostTrigger('deleteFolder', $info); } return $error; }