PHP code example of aizuyan / inotify
1. Go to this page and download the library: Download aizuyan/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/ */
aizuyan / inotify example snippets
$obj = new Aizuyan\Inotify\Inotify();
$obj->addExclude([
"/swp$/",
"/swpx$/",
"/~$/",
"/\d$/",
"/swx$/"
])->setCallback(function ($item){
echo $item["event"] . " 文件 " . $item["file"] . "\n";
})->addPaths("/datas/git/")->start();