PHPackages                             huang-yi/swoole-watcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. huang-yi/swoole-watcher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

huang-yi/swoole-watcher
=======================

Swoole file watcher.

v1.0.1(6y ago)1414.9k42MITPHPCI failing

Since Nov 20Pushed 6y ago2 watchersCompare

[ Source](https://github.com/huang-yi/swoole-watcher)[ Packagist](https://packagist.org/packages/huang-yi/swoole-watcher)[ RSS](/packages/huang-yi-swoole-watcher/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (5)Used By (2)

Swoole Watcher
==============

[](#swoole-watcher)

This package provides a file watcher.

Installation
------------

[](#installation)

The current version only supports [fswatch](https://github.com/emcrisostomo/fswatch), so you'll have to install fswatch first.

```
# MacOS
brew install fswatch

# Linux (building from Source)
wget https://github.com/emcrisostomo/fswatch/releases/download/{VERSION}/fswatch-{VERSION}.tar.gz
tar -xzvf fswatch-{VERSION}.tar.gz
cd fswatch-{VERSION} && ./configure && make && sudo make install && sudo ldconfig
```

> A user who wishes to build fswatch should get a release [tarball](https://github.com/emcrisostomo/fswatch/releases)

Then, make sure you have [swoole](https://www.swoole.co.uk/) extension installed in PHP.

```
pecl install swoole
```

Finally, you may install the Swoole Watcher via Composer:

```
composer require huang-yi/swoole-watcher
```

Usage
-----

[](#usage)

Create your watcher script like this:

```
