src/Leevel/Protocol/Process/HotOverload.php
protected function files(): array
    {
        $files = [];

        foreach ((array) $this->option->get('swoole\\hotoverload_watch') as $dir) {
            if (!is_dir($dir)) {
                continue;
            }

            list_directory($dir, true, function ($file) use (&$files) {
                if ($file->isFile()) {
                    if (in_array($file->getExtension(), ['php'], true)) {
                        $files[] = $file->getPath().'/'.$file->getFilename();
                    }
                }
            });
        }

        return $files;
    }
protected function files(): array
    {
        $files = [];

        foreach ((array) $this->option->get('swoole\\hotoverload_watch') as $dir) {
            if (!is_dir($dir)) {
                continue;
            }

            list_directory($dir, true, function ($file) use (&$files) {
                if ($file->isFile()) {
                    if (in_array($file->getExtension(), ['php'], true)) {
                        $files[] = $file->getPath().'/'.$file->getFilename();
                    }
                }
            });
        }

        return $files;
    }
扫描文件.

@return array