X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Ffilez.inc;h=a7fcd3943238e1abc73f0f3783461d187fd226f0;hb=d9b4dfbcb3d920445869db2c3abd706ee6916286;hp=d068cae33c113a901ba5e0876d0b651ae33cfd2f;hpb=f657368b72f62699e51cb6b7efeb9e0b30f02f67;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/filez.inc b/wwwroot/inc/filez.inc index d068cae..a7fcd39 100644 --- a/wwwroot/inc/filez.inc +++ b/wwwroot/inc/filez.inc @@ -1,27 +1,17 @@ 0) { return false; } @@ -29,36 +19,4 @@ public static function filename_secure(name){ } } - -/* -* Returns disk usage in bytes of directory $d. Limit depth level with $depth. -* Updates, documentation and examples: http://daniel.lorch.cc/projects/disk_usage/ -* -* Revision: 1.00 -*/ - -function disk_usage($d, $depth = NULL) { - if(is_file($d)) - return filesize($d); - - if(isset($depth) && $depth < 0) - return 0; - - if($d[strlen($d)-1] != '\\' || $d[strlen($d)-1] != '/') - $d .= '/'; - - $dh=@opendir($d); - if(!$dh) - return 0; - - while($e = readdir($dh)) - if($e != '.' && $e != '..') - $usage += disk_usage($d.$e, isset($depth) ? $depth - 1 : NULL); - - closedir($dh); - - return $usage; -} - - ?>