cocur / watchman
PHP wrapper for facebook/watchman
v0.1
2014-04-27 21:27 UTC
Requires
- php: >=5.4
- braincrafted/json: ~0.2
- symfony/process: ~2.5@beta
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0
- satooshi/php-coveralls: dev-master
This package is auto-updated.
Last update: 2024-11-20 10:29:55 UTC
README
PHP wrapper for
facebook/watchman
.
Features
- Simple PHP wrapper for
facebook/watchman
- Add, list and delete watched directories
- Add, list and delete triggers
- Compatible with PHP >= 5.4 and HHVM
Installation
You can install cocur/watchman
through Composer:
$ composer require cocur/watchman:@stable
In a production environment you should replace @stable
with the version you want to use.
Usage
use Cocur\Watchman\Watchman; $watchman = new Watchman(); $watch = $watchman->addWatch('/var/www/foobar'); $trigger = $watch->addTrigger('foo', '*.js', 'ls -al'); // Retrieve all watched directories $watched = $watchman->listWatches(); // Retrieve all triggers from a watch $triggers = $watch->listTriggers(); // Later... $trigger->delete(); $watch->delete();
Supported Watchman commands
- watch ✓
- watch-list ✓
- watch-del ✓
- clock ✓
- trigger ✓
- trigger-list ✓
- trigger-del ✓
- find ✓
- query ✓
- since ✓
- log-level ✓
- log ✓
- shutdown-server ✓
subscribeunsubscribe- get-sockname ✓
Changelog
Version 0.1 (27 April 2014)
- Initial release
- Add, delete and list watched directories
- Add, delete and list triggers
Author
License
The MIT license applies to cocur/watchman. For the full copyright and license information, please view the LICENSE file distributed with this source code.