https://github.com/koala-framework/file-watcher
Library for watching for file system changes
https://github.com/koala-framework/file-watcher
Last synced: about 1 year ago
JSON representation
Library for watching for file system changes
- Host: GitHub
- URL: https://github.com/koala-framework/file-watcher
- Owner: koala-framework
- License: bsd-2-clause
- Created: 2015-03-13T13:52:55.000Z (over 11 years ago)
- Default Branch: 2.0
- Last Pushed: 2024-04-18T10:53:42.000Z (about 2 years ago)
- Last Synced: 2024-09-19T04:18:18.020Z (over 1 year ago)
- Language: PHP
- Homepage: http://www.koala-framework.org/
- Size: 55.7 KB
- Stars: 11
- Watchers: 13
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
## File Watcher Php Library [](https://travis-ci.org/koala-framework/file-watcher)
Php library for watching for file system changes.
Supports different backends for best cross platform usage.
### Backends
* [watchmedo](https://pythonhosted.org/watchdog/) (Cross platform pything shell utility)
* [fswatch](http://emcrisostomo.github.io/fswatch/) (Cross-platform file change monitor with multiple backends)
* [inotifywait](http://linux.die.net/man/1/inotifywait) (Linux shell utility)
* [inotify](http://php.net/manual/en/book.inotify.php) (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();