This commit is contained in:
xl
2024-11-18 11:49:49 +08:00
parent dc15054c86
commit bbae787d4b
+1 -2
View File
@@ -3,10 +3,8 @@
namespace Kiri\Server\Abstracts;
use Kiri\Server\ServerInterface;
use Psr\Log\LoggerInterface;
use Swoole\Process;
use Kiri\Server\Processes\AbstractProcess;
use function GuzzleHttp\Psr7\uri_for;
class HotReload extends AbstractProcess
{
@@ -103,6 +101,7 @@ class HotReload extends AbstractProcess
*/
public function readFile(string $directory): void
{
var_dump($directory);
if (str_ends_with($directory, '.php') === true) {
inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
}