Skip to content
Library for watching for file system changes
Branch: 2.0
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Kwf/FileWatcher
tests
.gitignore
.travis.yml
COPYING
README.md
composer.json
composer.lock
phpunit.xml

README.md

File Watcher Php Library Build Status

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();
You can’t perform that action at this time.