|Maintainer Contact:||email@example.com (Rocco Howard)|
|Package Create Date:||2016-11-10|
|Package Last Update:||2019-02-05|
|Last Refreshed:||2020-05-24 15:07:31|
|Total Open Issues:||0|
Provides a Laravel console command that can watch a given folder, and any changes are passed to the provided command script.
Useful for running as a background task that initiates a virus scan on uploaded files.
Checkout our standalone command line tool inspired by the work we did here. github.com/hnhdigital-os/fs-watcher.
This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.
$ composer require-dev hnhdigital-os/laravel-folder-watcher dev-master
Enable the console command by editing app/Console/Kernel.php:
/** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ ... Bluora\LaravelFolderWatcher\FolderWatcherCommand::class, ... ];
Run the console command using the following:
Load a given configuration file. This will load a background process for each folder/binary combination.
# php artisan watcher load --config-file=***
Loads a given watch path and binary as a background process.
# php artisan watcher background --watch-path=*** --binary=*** --script-arguments=***
Runs a given watch path and binary.
# php artisan watcher run --watch-path=*** --binary=*** --script-arguments=***
Lists all the background watch processes currently active.
# php artisan watcher list
Provide a process id (from the list action) to stop it running. Using --pid=all will stop all processes.
# php artisan watcher kill --pid=***
You can provide any yaml based file as input to this command using the load action and the --config-file argument.
The yaml file is in the following format:
[folder path]: - [binary]: [arguments]
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.