function getFilesInfo() { $sysFiles = ACloud_Sys_Core_Common::listDir(ACLOUD_PATH . '/system/'); $tmp = array(); foreach ($sysFiles as $file) { $filename = basename($file); $tmp[$filename] = md5_file($file); } return $tmp; }
function listDir($path) { static $result = array(); $path = rtrim($path, "/") . "/"; $folder_handle = opendir($path); while (false !== ($filename = readdir($folder_handle))) { if (strpos($filename, '.') !== 0) { if (is_dir($path . $filename . "/")) { ACloud_Sys_Core_Common::listDir($path . $filename . "/"); } else { $result[] = $path . $filename; } } } closedir($folder_handle); return $result; }