2017 © Pedro Peláez
 

library rubberneck

Utility to monitor file system changes

image

calcinai/rubberneck

Utility to monitor file system changes

  • Monday, April 9, 2018
  • by calcinai
  • Repository
  • 1 Watchers
  • 3 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Rubberneck

A simple binding for ReactPHP event loops to watch files., (*1)

Currently only file poling and inotifywait in implemented, but is designed with stubs for other methods., (*2)

If possible, install inotifywait on your system, in Debian it's in the inotify-tools package. It is much more efficient than the file poll method., (*3)

Usage

$loop = \React\EventLoop\Factory::create();
$observer = new \Calcinai\Rubberneck\Observer($loop);

$observer->onModify(function($file_name){
    echo "Modified: $file_name\n";
});

$observer->onCreate(function($file_name){
    echo "Created: $file_name\n";
});

$observer->onDelete(function($file_name){
    echo "Deleted: $file_name\n";
});


$observer->watch('~/Desktop/*.txt');

$loop->run();

The Versions

09/04 2018

dev-master

9999999-dev

Utility to monitor file system changes

  Sources   Download

MIT

The Requires

 

by Michael Calcinai

06/02 2016

v0.1.1

0.1.1.0

Utility to monitor file system changes

  Sources   Download

MIT

The Requires

 

by Michael Calcinai