You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
14
vendor/swoole/examples/php/inotify.php
vendored
Executable file
14
vendor/swoole/examples/php/inotify.php
vendored
Executable file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// Open an inotify instance
|
||||
$fd = inotify_init();
|
||||
|
||||
// Watch __FILE__ for metadata changes (e.g. mtime)
|
||||
$watch_descriptor = inotify_add_watch($fd, __DIR__ . '/php', IN_MODIFY | IN_MOVED_FROM | IN_CREATE | IN_DELETE | IN_ISDIR);
|
||||
|
||||
while (true)
|
||||
{
|
||||
// Read events
|
||||
$events = inotify_read($fd);
|
||||
print_r($events);
|
||||
}
|
||||
|
Reference in New Issue
Block a user