public function find($path){}
public function getTree($path){}
public function hash($type,$path,$raw){}
+ public function free_space($path){}
}
}
return $return;
}
+
+ public function free_space($path){
+ return disk_free_space($this->datadir.$path);
+ }
/**
* @brief get the size of folder and it's content
return $storage->hash($type,self::getInternalPath($path),$raw);
}
}
+
+ static public function free_space($path='/'){
+ if(self::canRead($path) and $storage=self::getStorage($path)){
+ return $storage->free_space($path);
+ }
+ }
}
?>
$tmpl = new OC_TEMPLATE( "settings", "index", "admin");
$used=OC_FILESYSTEM::filesize('/');
-$free=disk_free_space(OC_CONFIG::getValue('datadirectory'));
+$free=OC_FILESYSTEM::free_space();
$total=$free+$used;
$relative=round(($used/$total)*100);
$tmpl->assign('usage',OC_HELPER::humanFileSize($used));