koala-framework-mine/file-watcher-mine

Library for watching for file system changes

Maintainers

Package info

github.com/sj8354661/file-watcher-mine

Homepage

pkg:composer/koala-framework-mine/file-watcher-mine

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

1.0.2 2019-03-26 10:33 UTC

This package is auto-updated.

Last update: 2026-03-27 03:36:31 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();