Complete move from old repository to new repository structure!
This commit is contained in:
parent
2cabb61b54
commit
72735c24f7
27 changed files with 964 additions and 730 deletions
|
@ -32,6 +32,16 @@ if (! function_exists('human_readable')) {
|
|||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue