Closed nivpenso closed 2 years ago
so after few hours of playing around it seems that if I don't store the return value of uv_fs_event_init
in a local variable the callback will never be fired.
Solution
Just have store the return value of the function uv_fs_event_init
a local variable
$fsevent1 = uv_fs_event_init($loop, "/home", function($rsc, $name, $event, $status) {
echo "changed1";
}, 0);
$fsevent2 = uv_fs_event_init($loop, "/tmp", function($rsc, $name, $event, $status) {
echo "changed2";
}, 0);
Seems like this has been solved. :wink:
Hi,
I want to know whether it is possible to set a watcher on multiple paths like
/home/
/tmp/
when I try to do something like that:
I get the following error:
this error is thrown on the second time I try to call uv_fs_event_init