empress-php / inotify
Non-blocking ext-inotify wrapper for Amp
0.1.0
2021-05-03 15:24 UTC
Requires
- ext-inotify: *
- amphp/amp: ^2.5
Requires (Dev)
- amphp/php-cs-fixer-config: dev-master
- amphp/phpunit-util: ^1.4
- friendsofphp/php-cs-fixer: ^2.18
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.7
This package is auto-updated.
Last update: 2025-03-04 17:59:10 UTC
README
inotify
Non-blocking ext-inotify wrapper for Amp
Install it
composer require empress-php/inotify
Example
<?php use Amp\Loop; use Empress\Inotify\Inotify; require_once __DIR__ . '/../vendor/autoload.php'; Loop::repeat(1000, function () { \touch(__FILE__); }); Loop::run(function () { $inotify = new Inotify(); $inotify->addWatch(__DIR__, \IN_ATTRIB); while ($events = yield $inotify->readEvents()) { \var_dump($events); } });