PHPackages                             stikmanw/file-event-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. [File &amp; Storage](/categories/file-storage)
4. /
5. stikmanw/file-event-watcher

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

stikmanw/file-event-watcher
===========================

File system watcher allowing for observeable handlers when a directory changes or content of the directory changes.

v0.1.0(10y ago)3220MITPHPPHP &gt;=5.3.0

Since Jun 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/stikmanw/Watcher)[ Packagist](https://packagist.org/packages/stikmanw/file-event-watcher)[ RSS](/packages/stikmanw-file-event-watcher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Watcher [![Build Status](https://camo.githubusercontent.com/0b9cec6b728d65e3fca555494383e1a7cc0b67aacef8532c21e447ce50c899b7/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7374696b6d616e772f576174636865722e706e67)](http://travis-ci.org/stikmanw/Watcher)
========================================================================================================================================================================================================================================================================

[](#watcher--)

File system watcher allowing for observeable handlers when a directory changes or content of the directory changes.

Requirements
------------

[](#requirements)

- PHP 5.4 &gt;=
- Linux Files System / Mac OSX tested
- Windows (untested)

Description
-----------

[](#description)

You used the file FileWatcher like you would use typical event listener. The main advantage to this class is it does not require installing any additional libraries and can simply be installed via composer and used immidiately. You can attach multiple listeners to the 3 main events:

- **CREATE** - File has been created
- **MODIFIED** - File has been changed (currently uses a md5 hash to identify change)
- **DELETE** - File has been deleted since last check

Example
-------

[](#example)

Attach to create events

```
use Stikman\FileWatcher;

$watcher = new FileWatcher("/tmp/mystuff");
$watcher->on(FileWatcher::CREATE, function() {
  // do stuff
});
```

Set the pulling interval

```
$watcher = new FileWatcher("/tmp/mystuff");
$watcher->setInterval(100); // 100 millioseconds to check disk defaults to 25ms
```

Custom pattern match against file system for monitoring configuration data

```
$watcher = new FileWatcher("/tmp/mystuff", "*.json");
```

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3982d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/975346cf0dcc6361345bf8650d5da63b816d44b4f9e7bfa264ff8cac6c17acd1?d=identicon)[bdcarter42](/maintainers/bdcarter42)

---

Top Contributors

[![rv-bcarter](https://avatars.githubusercontent.com/u/34041945?v=4)](https://github.com/rv-bcarter "rv-bcarter (16 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stikmanw-file-event-watcher/health.svg)

```
[![Health](https://phpackages.com/badges/stikmanw-file-event-watcher/health.svg)](https://phpackages.com/packages/stikmanw-file-event-watcher)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

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