eee
This commit is contained in:
@@ -78,7 +78,7 @@ class HotReload extends AbstractProcess
|
|||||||
$read = inotify_read($this->pipe);
|
$read = inotify_read($this->pipe);
|
||||||
|
|
||||||
foreach ($read as $item) {
|
foreach ($read as $item) {
|
||||||
$this->reWatch($this->watches[$item['mask']]);
|
$this->reWatch($this->watches[$item['wd']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->reload();
|
$this->reload();
|
||||||
@@ -119,7 +119,7 @@ class HotReload extends AbstractProcess
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $directory
|
* @param int $directory
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function reWatch(int $directory): void
|
public function reWatch(int $directory): void
|
||||||
@@ -129,6 +129,8 @@ class HotReload extends AbstractProcess
|
|||||||
|
|
||||||
$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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user