Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Library for watching for file system changes

License

Notifications You must be signed in to change notification settings

stakx-io/file-watcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Packages

No packages published

Languages

  • PHP 100.0%