PHP code example of flow-control / react-inotify

1. Go to this page and download the library: Download flow-control/react-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/ */

    

flow-control / react-inotify example snippets


$inotify = new \Flowcontrol\React\Inotify\InotifyStream();
$inotify->on('event', function (array $data) {
    var_dump($data);
});
$inotfiy->addWatch(__DIR__, IN_CLOSE_WRITE);