Remove any confusing legacy sizing files; everything in the panel is true MB (1000) not MiB

This commit is contained in:
Dane Everitt 2020-05-08 21:13:39 -07:00
parent 2d95204e9a
commit 6967b76ae6
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 0 additions and 107 deletions

View file

@ -1,34 +1,4 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
if (! function_exists('human_readable')) {
/**
* Generate a human-readable filesize for a given file path.
*
* @param string $path
* @param int $precision
* @return string
*/
function human_readable($path, $precision = 2)
{
if (is_numeric($path)) {
$i = 0;
while (($path / 1024) > 0.9) {
$path = $path / 1024;
$i++;
}
return round($path, $precision) . ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'][$i];
}
return app('file')->humanReadableSize($path, $precision);
}
}
if (! function_exists('is_digit')) {
/**