# copied from http://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.facet/trunk/releng/org.eclipse.emf.facet.releng.buckminster/resources/index.php 0) { ?>
"; function loadDirSimple($dir,$ext,$type) { // 1D array $stuff = array(); if (is_dir($dir) && is_readable($dir)) { $handle=opendir($dir); while (($file = readdir($handle))!==false) { if ( ($ext=="" || preg_match("/".$ext."$/",$file)) && $file!=".." && $file!=".") { if (($type=="f" && is_file($file)) || ($type=="d" && is_dir($file))) { $stuff[] = "$file"; } } } closedir($handle); } return $stuff; } function pretty_size($bytes) { $sufs = array("B", "K", "M", "G", "T", "P"); //we shouldn't be larger than 999.9 petabytes any time soon, hopefully $suf = 0; while($bytes >= 1000) { $bytes /= 1024; $suf++; } return sprintf("%3.1f%s", $bytes, $sufs[$suf]); } ?>