public static function runMe(&$params, $debug = true) { $path = driverCommand::getModPath('pharinix_mod_file_manager'); include_once $path . 'drivers/fileManager.php'; $resp = array(); $roots = driverFileManager::getRoots(); foreach ($roots as $root) { $resp[] = $root->getPath(); } return $resp; }
public static function runMe(&$params, $debug = true) { $path = driverCommand::getModPath('pharinix_mod_file_manager'); include_once $path . 'drivers/fileManager.php'; $resp = array(); $roots = driverFileManager::getRoots(); foreach ($roots as $root) { $total = disk_total_space($root->getRealpath()); $free = disk_free_space($root->getRealpath()); $percentage = ($total - $free) * 100 / $total; $resp[] = array('path' => $root->getPath(), 'used' => $total - $free, 'total' => $total, 'used_percent' => round($percentage, 2)); } return $resp; }