X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Ffilez.inc;h=a7fcd3943238e1abc73f0f3783461d187fd226f0;hb=233544e1f97c1115cbeb267ef9ec64e55d370cb5;hp=5ca65c93c77d4bf06ac5c70f31d083b0727e60f5;hpb=b584ae7bcbbe0ada3e9c6f135db5ea9f7c4905bf;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/filez.inc b/wwwroot/inc/filez.inc index 5ca65c9..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; -} - - ?>