Download the PHP package andrewmackrodt/fsnotify without Composer
On this page you can find all versions of the php package andrewmackrodt/fsnotify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrewmackrodt/fsnotify
More information about andrewmackrodt/fsnotify
Files in andrewmackrodt/fsnotify
Package fsnotify
Short Description Event based file system watcher for PHP
License MIT
Informations about the package fsnotify
FsNotify
Event based file system watcher for PHP. FsNotify is fully† async and event based using Amp and Symfony\EventDispatcher.
† excluding stat operations to determine file metadata
Usage
Quick start
Advanced usage
FsNotify supports monitoring multiple paths with configurable callbacks and filters. See the examples directory for complete usage:
- examples/standard.php
- examples/async.php
- examples/advanced.php
- examples/laravel-ide-helper.php
This library was developed with the laravel-ide-helper use case in mind, it highlights a moderately complicated yet useful usage scenario.
Adapters
PhpAdapter - fallback adapter if no other adapters are supported. PhpAdapter uses file polling to detect changes. The adapter defaults to a configurable polling interval of 1 second. It is sufficient for monitoring a small amount of files.
FswatchAdapter - fswatch requires the GNU CLI tool fswatch, it's more performant than PhpAdapter and detects file changes almost instantaneously. It is preferred in most cases but can be slow to propagate large amounts of file deletions (such as deleting the vendor or node_modules folder of a PHP or JavaScript project respectively); however, this use case is considered atypical and should not affect most users. It also does not initially recurse into a copied or moved directory but this is once again not typically a requirement when watching for changes to Laravel models or static asset directories before executing a third-party tool.
All versions of fsnotify with dependencies
amphp/process Version ^1.1
amphp/react-adapter Version dev-promise
composer/xdebug-handler Version ^1.3
react/event-loop Version ^1.1
symfony/event-dispatcher Version ^4.3