library file-watcher
Library for watching for file system changes
koala-framework/file-watcher
Library for watching for file system changes
- Thursday, April 28, 2016
- by nsams
- Repository
- 9 Watchers
- 8 Stars
- 13,765 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 3 Forks
- 1 Open issues
- 2 Versions
- 5 % Grown
File Watcher Php Library
Php library for watching for file system changes., (*1)
Supports different backends for best cross platform usage., (*2)
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
Installation
Install using composer:, (*3)
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();