PHP code example of empress-php / inotify
1. Go to this page and download the library: Download empress-php/inotify library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
empress-php / inotify example snippets
use Amp\Loop;
use Empress\Inotify\Inotify;
E__);
});
Loop::run(function () {
$inotify = new Inotify();
$inotify->addWatch(__DIR__, \IN_ATTRIB);
while ($events = yield $inotify->readEvents()) {
\var_dump($events);
}
});