本文整理汇总了PHP中api_Utils::GetDirectorySize方法的典型用法代码示例。如果您正苦于以下问题:PHP api_Utils::GetDirectorySize方法的具体用法?PHP api_Utils::GetDirectorySize怎么用?PHP api_Utils::GetDirectorySize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api_Utils
的用法示例。
在下文中一共展示了api_Utils::GetDirectorySize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getQuotaInfo
public function getQuotaInfo()
{
$Size = 0;
$aResult = \api_Utils::GetDirectorySize($this->path);
if ($aResult && $aResult['size']) {
$Size = (int) $aResult['size'];
}
return array($Size, 0);
}
示例2: getFullQuotaInfo
public function getFullQuotaInfo()
{
$iFreeSize = 0;
$sRootPath = $this->getRootPath(\EFileStorageTypeStr::Personal);
$aSize = \api_Utils::GetDirectorySize($sRootPath);
$iUsageSize = (int) $aSize['size'];
$sRootPath = $this->getRootPath(\EFileStorageTypeStr::Corporate);
$aSize = \api_Utils::GetDirectorySize($sRootPath);
$iUsageSize += (int) $aSize['size'];
$oAccount = $this->getAccount();
if ($oAccount) {
$oTenant = $this->getTenant();
if ($oTenant) {
$iFreeSize = $oTenant->FilesUsageDynamicQuotaInMB * 1024 * 1024 - $iUsageSize;
}
}
return array($iUsageSize, $iFreeSize);
}
示例3: GetRealQuota
public function GetRealQuota($oAccount, $sType)
{
$iUsageSize = 0;
$iFreeSize = 0;
if ($oAccount) {
$sRootPath = $this->getRootPath($oAccount, \EFileStorageTypeStr::Personal, true);
$aSize = \api_Utils::GetDirectorySize($sRootPath);
$iUsageSize += (int) $aSize['size'];
$sRootPath = $this->getRootPath($oAccount, \EFileStorageTypeStr::Corporate, true);
$aSize = \api_Utils::GetDirectorySize($sRootPath);
$iUsageSize += (int) $aSize['size'];
$oApiTenants = \CApi::Manager('tenants');
if ($oApiTenants) {
$oTenant = $oApiTenants->GetTenantById($oAccount->IdTenant);
if ($oTenant) {
$iFreeSize = $oTenant->FilesUsageDynamicQuotaInMB * 1024 * 1024 - $iUsageSize;
}
}
}
return array($iUsageSize, $iFreeSize);
}