Simple, async inotify event handler build with ReactPHP
This library is heavily inspired by reactphp/stream.
This library depends on the PHP Inotify extension, available via PECL
$ pecl install inotifyIf you are looking for PHP 7 support you need to install flow-control/react-inotify in version 1. Version 2 dropped support for PHP 7.
$ composer require flow-control/react-inotifyCreate an object from the \Flowcontrol\React\Inotify\InotifyStream class and register your event handlers.
$inotify = new \Flowcontrol\React\Inotify\InotifyStream(); $inotify->on('event', function (array$data){var_dump($data)}); $inotfiy->addWatch(__DIR__, IN_CLOSE_WRITE);$ composer install $ composer testMIT, see LICENSE file.