perf: 优化删除临时文件

This commit is contained in:
kuaifan
2024-10-30 15:41:33 +08:00
parent 1a7591314f
commit b03fb9f1de
4 changed files with 87 additions and 120 deletions

View File

@@ -1401,7 +1401,7 @@ class SystemController extends AbstractController
if ($isMain || $isApp) {
$path = 'js/build/';
$list = Base::readDir(public_path($path), false);
$list = Base::recursiveFiles(public_path($path), false);
foreach ($list as $item) {
if (is_file($item) && filesize($item) > 50 * 1024) {
$array[] = $path . basename($item);