The Wayback Machine - http://web.archive.org/web/20210513223958/https://github.com/OctopyID/LaraInotify
Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
May 13, 2021
May 13, 2021
src
May 13, 2021
May 13, 2021
May 13, 2021
May 13, 2021
May 13, 2021

Version Downloads License

Lara Inotify

Lara Inotify is a wrapper for inotify for Laravel with added some functions to make it easier to watch filesystem and avoid memory leaks.

Requirement

Installation

To install the package, simply follow the steps below.

Install the package using Composer:

$ composer require octopyid/laravel-watcher

$ artisan vendor:publish --provider="Octopy\Inotify\InotifyServiceProvider"

Basic Usage

use Octopy\Inotify\Inotify;
use Octopy\Inotify\Event\InotifyEvent;
use Octopy\Inotify\Watcher\InotifyWatcher;

$inotify = new Inotify('foo.txt');

$inotify->event(function (InotifyEvent $event) {

    $event->on(IN_MODIFY, function (InotifyWatcher $watcher) {
        // do something
    });
    
    $event->on(IN_DELETE, function (InotifyWatcher $watcher) {
        // do something
    });

    // see : https://www.php.net/manual/en/inotify.constants.php for more events.
});


$inotify->watch();

Security

If you discover any security related issues, please email supianidz@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel File System Watcher

Resources

License

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages