task/watch

Filesystem watching for Task

v0.2.0 2014-05-13 08:02 UTC

This package is not auto-updated.

Last update: 2024-04-13 14:02:30 UTC


README

Build Status Coverage Status

Example

use Task\Plugin\WatchPlugin;

$project->inject(function ($container) {
    $container['watch'] = new WatchPlugin;
});

$project->addTask('watch', ['watch', function ($watch) {
    $watch->init('/tmp')
        ->addListener('modify', function ($event) {
            # Do something
        });
}]);

Installation

Add to composer.json:

...
"require-dev": {
    "task/watch": "~0.1"
}
...

Usage

See the documentation for mbfisher/watch for documentation on using the watchers.