function profile_directory($dir, $trim_from_output, &$add_to) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != ".." && $object != ".DS_Store") { if (filetype($dir . "/" . $object) == "dir") { profile_directory($dir . "/" . $object, $trim_from_output, $add_to); } else { $add_to .= "\t\t\"" . ltrim(str_replace($trim_from_output, '', $dir), '/') . "/" . $object . '":"' . md5_file($dir . "/" . $object) . "\",\n"; } } } } }
function profile_directory($dir, $trim_from_output, &$add_to) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != ".." && $object != ".DS_Store" && $object != ".git" && $object != "cashmusic.ini.php" && $object != "connections.json") { if (filetype($dir . "/" . $object) == "dir") { profile_directory($dir . "/" . $object, $trim_from_output, $add_to); } else { $object_name = ltrim(str_replace($trim_from_output, '', $dir), '/') . "/" . $object; if (substr($object_name, 0, 4) != 'docs' && substr($object_name, 0, 5) != 'tests' && substr($object_name, 0, 5) != 'tools' && substr($object_name, 0, 10) != 'installers' && substr($object_name, 0, 11) != 'testinstall' && substr($object_name, 0, 1) != '/' && substr($object_name, 0, 1) != '.' && substr($object_name, 0, 10) != 'index.html' && substr($object_name, 0, 7) != 'LICENSE' && substr($object_name, 0, 8) != 'Makefile' && substr($object_name, 0, 9) != 'README.md' && substr($object_name, 0, 20) != 'interfaces/php/demos' && substr($object_name, 0, 15) != 'framework/cache' && substr($object_name, 0, 12) != 'framework/db') { $add_to .= "\t\t\"" . $object_name . '":"' . md5_file($dir . "/" . $object) . "\",\n"; } } } } } }