PHPackages                             tsufeki/react-filesystem-monitor - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. tsufeki/react-filesystem-monitor

ActiveLibrary[File &amp; Storage](/categories/file-storage)

tsufeki/react-filesystem-monitor
================================

Asynchronous filesystem monitor based on React PHP

0.4.1(7y ago)74.8k↓50%[1 PRs](https://github.com/tsufeki/react-filesystem-monitor/pulls)1MITPHPPHP &gt;=7.0

Since Oct 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/tsufeki/react-filesystem-monitor)[ Packagist](https://packagist.org/packages/tsufeki/react-filesystem-monitor)[ RSS](/packages/tsufeki-react-filesystem-monitor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (9)Used By (1)

React Filesystem Monitor
========================

[](#react-filesystem-monitor)

Asynchronous filesystem monitor based on React PHP.

Currently these implementations are available:

- `INotifyProcessMonitor` based on [`inotifywait`](https://github.com/rvoicilas/inotify-tools/wiki) command line utility, used on Linux.
- `FsWatchProcessMonitor` based on [`fswatch`](http://emcrisostomo.github.io/fswatch/), used on OSX.

All implementations' constructors take two arguments: a path to watch (file or recursively watched directory) and optional array of event to watch for (defaults to all events).

Available events:

- `access` i.e. read
- `attribute` - modification of permissions, timestamps etc.
- `close`
- `create`
- `delete`
- `modify`
- `move_from`, `move_to` - file move, fired with source and destination path respectively. Only those for paths inside watched dir are fired.
- `open`

These events pass as arguments: path which triggered it, boolean indicating whether the path is a directory, event name and monitor instance itself.

Additional events:

- `all` - fired for all events above
- `start` - fired when watchers finished setting up
- `error`

Please note that not all backends support all events. `fswatch` won't emit `open` and `close` events; also `start` is fired immediately after process starts instead of when setup is complete.

Example
-------

[](#example)

```
$loop = React\EventLoop\Factory::create();

$monitor = (new ReactFilesystemMonitor\FilesystemMonitorFactory())->create('foo/bar', ['modify', 'delete']);
$monitor->on('all', function ($path, $isDir, $event, $monitor) {
    echo sprintf("%s:  %s%s\n", $event, $path, $isDir ? ' [dir]' : '');
});
$monitor->start($loop);

$loop->run();
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~163 days

Recently: every ~194 days

Total

6

Last Release

2667d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5578f15ff14d148f32bfcdb831a9ca6050318283762622a9fac29179886c0f3c?d=identicon)[tsufeki](/maintainers/tsufeki)

---

Top Contributors

[![tsufeki](https://avatars.githubusercontent.com/u/4078572?v=4)](https://github.com/tsufeki "tsufeki (21 commits)")

### Embed Badge

![Health badge](/badges/tsufeki-react-filesystem-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/tsufeki-react-filesystem-monitor/health.svg)](https://phpackages.com/packages/tsufeki-react-filesystem-monitor)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k116.9M402](/packages/react-socket)[php-pm/php-pm

PHP-PM is a process manager, supercharger and load balancer for PHP applications.

6.6k441.3k8](/packages/php-pm-php-pm)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[react/child-process

Event-driven library for executing child processes with ReactPHP.

34076.1M136](/packages/react-child-process)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
