calcinai/rubberneck
最新稳定版本:v0.1.1
Composer 安装命令:
composer require calcinai/rubberneck
包简介
Utility to monitor file system changes
README 文档
README
A simple binding for ReactPHP event loops to watch files.
Currently only file poling and inotifywait in implemented, but is designed with stubs for other methods.
If possible, install inotifywait on your system, in Debian it's in the inotify-tools package. It is much more efficient than the file
poll method.
#Usage
$loop = \React\EventLoop\Factory::create(); $observer = new \Calcinai\Rubberneck\Observer($loop); $observer->onModify(function($file_name){ echo "Modified: $file_name\n"; }); $observer->onCreate(function($file_name){ echo "Created: $file_name\n"; }); $observer->onDelete(function($file_name){ echo "Deleted: $file_name\n"; }); $observer->watch('~/Desktop/*.txt'); $loop->run();
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-11