private static final function removeFiles($source) { if (is_array($source)) { foreach ($source as $src) { self::removeFiles($src); } } else { fn_uc_rm($source); } return; }
/** * Function remove obsolete or new files after upgrade or reverting upgrade. * * @param string $source Source directory * @param string $xml_file Path to xml file with list of files. * @param string $section section of the xml file */ function fn_uc_rm_files($source, $xml_file, $section) { $files_list = fn_uc_get_files_from_xml($xml_file, $section); $themes_files = fn_uc_find_in_themes($files_list, $source); $files_list = array_merge($files_list, $themes_files); foreach ($files_list as $file) { fn_uc_rm($source . '/' . $file); } }