예제 #1
0
파일: weblib.php 프로젝트: zseand/kloxo
 static function web_getdisk_usage($customer_name, $domainname)
 {
     global $gbl, $sgbl, $login, $ghtml;
     return;
     //$path[] = "__path_customer_root/$customer_name/$domainname";
     $path[] = "__path_customer_root/{$customer_name}/__processed_stats/{$domainname}";
     $path[] = "__path_program_home/domain/{$domainname}/__backup/";
     //$path[] = "__path_httpd_root/$domainname";
     $t = 0;
     foreach ($path as $p) {
         $t += lxfile_dirsize($p);
     }
     return $t;
 }
예제 #2
0
function lxfile_dstat($dir, $duflag)
{
    $dir = expand_real_root($dir);
    $list = lscandir_without_dot($dir);
    $ret = null;
    foreach ($list as $l) {
        $stat = lstat("{$dir}/{$l}");
        get_file_type("{$dir}/{$l}", $stat);
        remove_unnecessary_stat($stat);
        if ($duflag && is_dir("{$dir}/{$l}") || $l === ".trash") {
            $stat['size'] = lxfile_dirsize("{$dir}/{$l}", true);
        } else {
            $stat['size'] = lxfile_size("{$dir}/{$l}");
        }
        $stat['name'] = "{$dir}/{$l}";
        $ret[] = $stat;
    }
    //dprintr($ret);
    return $ret;
}
예제 #3
0
 static function findTotalUsage($driver, $list)
 {
     foreach ($list as $k => $d) {
         $ret[$k] = 0;
         $ret[$k] += lxfile_dirsize("__path_program_home/client/{$d['nname']}/");
         $ret[$k] += lxfile_dirsize("__path_customer_root/{$d['nname']}/");
     }
     return $ret;
 }
예제 #4
0
 static function findTotalUsage($driver, $list)
 {
     foreach ($list as $k => $l) {
         $name = $l['dbname'];
         $ret[$k] = lxfile_dirsize("__path_mysql_datadir/{$name}");
     }
     return $ret;
 }
예제 #5
0
파일: domainlib.php 프로젝트: zseand/kloxo
 function getQuotadisk_usage()
 {
     global $gbl, $sgbl, $login, $ghtml;
     return lxfile_dirsize("/home/kloxo/domain/{$this->nname}");
 }
예제 #6
0
 static function getBackupDiskSize($vpsname)
 {
     return lxfile_dirsize("__path_program_home/vps/{$vpsname}/__backup");
 }