Pure-PHP inotify bindind (FFI-based)
This package is auto-updated.
Last update: 2021-04-18 16:45:48 UTC
php-inotify-ffi is a pure-PHP inotify binding based on FFI.
This is an experimental / WIP package. For a stable inotify binding, use php-inotify.
The goal of this package is to expose the raw inotify API to PHP, while being memory safe and preventing resource leaks.
As the C inotify API returns file descriptors, this package returns PHP streams.
This is useful for the following reasons:
The streams can be used with polling mechanisms such as
stream_select() or event loops such as ReactPHP or AMPHP. It's also possible to make the streams unblocking with
As the inotify file descriptors are owned by PHP streams, they are managed by PHP. This ensures that the file descriptors are eventually closed, which prevents descriptor leaks.
The extension is stable and has the same capabilities.