mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 15:40:25 +00:00
23 lines
397 B
PHP
23 lines
397 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
class Helpers
|
|
{
|
|
|
|
public static function checkPathSize($path)
|
|
{
|
|
// Check path size
|
|
$pathSize = shell_exec('du -sh ' . $path);
|
|
$pathSize = trim($pathSize);
|
|
$pathSize = explode("\t", $pathSize);
|
|
|
|
if (isset($pathSize[0])) {
|
|
$pathSize = $pathSize[0];
|
|
return $pathSize;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
}
|