<?php
// 应用公共文件
function store_path(string $disk = 'local')
{
    return config('filesystem.disks.'.$disk.'.root');
}
function bytesToSize($a,int $decimals = 2){
    $d = [" B", " KB", " MB", " GB", " TB", " PB"];
    $e = 1024;
    for ($b = 0; $b < count($d); $b++) {
        if ($a < $e) {
            $ret = $b == 0 ? $a : number_format($a,$decimals);
            return $ret . $d[$b];
        }
        $a /= $e;
    }
}