koala-framework / file-watcher
Library for watching for file system changes
Installs: 37 899
Dependents: 1
Suggesters: 1
Security: 0
Stars: 11
Watchers: 13
Forks: 7
Open Issues: 2
Requires
- psr/log: ~1.0
- symfony/event-dispatcher: ~2.6
- symfony/finder: ~2.6
- symfony/process: ~2.6
Requires (Dev)
- phpunit/php-invoker: *
- phpunit/phpunit: 4.5.*
- symfony/filesystem: ~2.6
This package is auto-updated.
Last update: 2024-12-18 12:29:57 UTC
README
Php library for watching for file system changes.
Supports different backends for best cross platform usage.
Backends
- watchmedo (Cross platform pything shell utility)
- fswatch (Cross-platform file change monitor with multiple backends)
- inotifywait (Linux shell utility)
- inotify (Php PECL extension)
- Polling fallback (Slow)
Requirements
- Php 5.3+
Installation
Install using composer:
composer require koala-framework/file-watcher
Example Usage
$watcher = Kwf\FileWatcher\Watcher::create('.');
$watcher->addListener(Kwf\FileWatcher\Events::MODIFY, function($e) {
var_dump($e->filename);
});
$watcher->start();