empress-php/inotify

Non-blocking ext-inotify wrapper for Amp

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/empress-php/inotify

0.1.0 2021-05-03 15:24 UTC

This package is auto-updated.

Last update: 2025-10-04 19:43:16 UTC


README

PHP Build Latest Stable Version Coverage Status

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);
    }
});