eee
This commit is contained in:
+1
-10
@@ -76,8 +76,6 @@ class HotReload extends AbstractProcess
|
|||||||
}
|
}
|
||||||
while (!$this->isStop()) {
|
while (!$this->isStop()) {
|
||||||
$read = inotify_read($this->pipe);
|
$read = inotify_read($this->pipe);
|
||||||
var_dump($read);
|
|
||||||
|
|
||||||
foreach ($read as $item) {
|
foreach ($read as $item) {
|
||||||
$this->reWatch($item['wd']);
|
$this->reWatch($item['wd']);
|
||||||
}
|
}
|
||||||
@@ -114,9 +112,6 @@ class HotReload extends AbstractProcess
|
|||||||
if (str_ends_with($directory, '.php') === true) {
|
if (str_ends_with($directory, '.php') === true) {
|
||||||
$wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
|
$wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
|
||||||
|
|
||||||
var_dump($wd);
|
|
||||||
|
|
||||||
|
|
||||||
$this->watches[$wd] = $directory;
|
$this->watches[$wd] = $directory;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,11 +126,7 @@ class HotReload extends AbstractProcess
|
|||||||
if (isset($this->watches[$directory])) {
|
if (isset($this->watches[$directory])) {
|
||||||
inotify_rm_watch($this->pipe, $directory);
|
inotify_rm_watch($this->pipe, $directory);
|
||||||
|
|
||||||
$wd = inotify_add_watch($this->pipe, $directory, IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
|
inotify_add_watch($this->pipe, $this->watches[$directory], IN_MODIFY | IN_MOVE | IN_CREATE | IN_DELETE);
|
||||||
|
|
||||||
var_dump($wd);
|
|
||||||
|
|
||||||
$this->watches[$wd] = $directory;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user