2017 © Pedro Peláez
 

library file-watcher

Library for watching for file system changes

image

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

The README.md

File Watcher Php Library Build Status

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

  • Php 5.3+

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();

The Versions