{"id":24524068,"url":"https://github.com/hnhdigital-os/laravel-folder-watcher","last_synced_at":"2025-06-12T00:33:59.877Z","repository":{"id":44726263,"uuid":"73382984","full_name":"hnhdigital-os/laravel-folder-watcher","owner":"hnhdigital-os","description":"Please use fs-watcher - we're not maintaining this package","archived":false,"fork":false,"pushed_at":"2019-02-05T09:42:17.000Z","size":28,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T12:59:46.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/hnhdigital-os/fs-watcher","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hnhdigital-os.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-10T13:07:30.000Z","updated_at":"2022-07-12T01:35:38.000Z","dependencies_parsed_at":"2022-08-02T22:31:03.182Z","dependency_job_id":null,"html_url":"https://github.com/hnhdigital-os/laravel-folder-watcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hnhdigital-os/laravel-folder-watcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnhdigital-os%2Flaravel-folder-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnhdigital-os%2Flaravel-folder-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnhdigital-os%2Flaravel-folder-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnhdigital-os%2Flaravel-folder-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hnhdigital-os","download_url":"https://codeload.github.com/hnhdigital-os/laravel-folder-watcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnhdigital-os%2Flaravel-folder-watcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259370901,"owners_count":22847468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T04:18:10.446Z","updated_at":"2025-06-12T00:33:59.858Z","avatar_url":"https://github.com/hnhdigital-os.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Folder Watcher\n\nProvides a Laravel console command that can watch a given folder, and any changes are passed to the provided command script.\n\nUseful for running as a background task that initiates a virus scan on uploaded files.\n\nCheckout our standalone command line tool inspired by the work we did here. [github.com/hnhdigital-os/fs-watcher](https://github.com/hnhdigital-os/fs-watcher).\n\n[![Latest Stable Version](https://poser.pugx.org/hnhdigital-os/laravel-folder-watcher/v/stable.svg)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher) [![Total Downloads](https://poser.pugx.org/hnhdigital-os/laravel-folder-watcher/downloads.svg)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher) [![Latest Unstable Version](https://poser.pugx.org/hnhdigital-os/laravel-folder-watcher/v/unstable.svg)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher) [![License](https://poser.pugx.org/hnhdigital-os/laravel-folder-watcher/license.svg)](https://packagist.org/packages/hnhdigital-os/laravel-folder-watcher)\n\n[![Build Status](https://travis-ci.org/hnhdigital-os/laravel-folder-watcher.svg?branch=master)](https://travis-ci.org/hnhdigital-os/laravel-folder-watcher) [![StyleCI](https://styleci.io/repos/73382984/shield?branch=master)](https://styleci.io/repos/73382984) [![Test Coverage](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher/badges/coverage.svg)](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher/coverage) [![Issue Count](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher/badges/issue_count.svg)](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher) [![Code Climate](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher/badges/gpa.svg)](https://codeclimate.com/github/hnhdigital-os/laravel-folder-watcher)\n\nThis package has been developed by H\u0026H|Digital, an Australian botique developer. Visit us at [hnh.digital](http://hnh.digital).\n\n## Install\n\nVia composer:\n\n`$ composer require-dev hnhdigital-os/laravel-folder-watcher dev-master`\n\nEnable the console command by editing app/Console/Kernel.php:\n\n```php\n    /**\n     * The Artisan commands provided by your application.\n     *\n     * @var array\n     */\n    protected $commands = [\n      ...\n      Bluora\\LaravelFolderWatcher\\FolderWatcherCommand::class,\n      ...\n    ];\n```\n\n## Usage\n\nRun the console command using the following:\n\n### Load\n\nLoad a given configuration file. This will load a background process for each folder/binary combination.\n\n`# php artisan watcher load --config-file=***`\n\n### Background\n\nLoads a given watch path and binary as a background process.\n\n`# php artisan watcher background --watch-path=*** --binary=*** --script-arguments=***`\n\n### Run\n\nRuns a given watch path and binary.\n\n`# php artisan watcher run --watch-path=*** --binary=*** --script-arguments=***`\n\n### List\n\nLists all the background watch processes currently active.\n\n`# php artisan watcher list`\n\n### Kill\n\nProvide a process id (from the list action) to stop it running. Using --pid=all will stop all processes.\n\n`# php artisan watcher kill --pid=***`\n\n## Configuration file\n\nYou can provide any yaml based file as input to this command using the load action and the --config-file argument.\n\nThe yaml file is in the following format:\n\n```yaml\n[folder path]:\n    - [binary]: [arguments]\n```\n\n* [folder path]: The directory that will be watched for changes. The watcher recursively adds all child folders.\n* [binary]: The binary that we will run. This could be an absolute path or an alias. (eg php)\n* [arguments]: The arguments that need to be given to the binary. Use the placeholders below to allow the watcher to pass this through.\n\n### Command placeholders\n\n* {{file-path}}: The absolute file path to the changed file.\n* {{root-path}}: The base directory of the watcher.\n* {{file-removed}}: Boolean (1 or 0) to indicate if the file was deleted.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/hnhdigital-os/laravel-folder-watcher/blob/master/CONTRIBUTING.md) for details.\n\n## Credits\n\n* [Rocco Howard](https://github.com/therocis)\n* [All Contributors](https://github.com/hnhdigital-os/laravel-folder-watcher/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](https://github.com/hnhdigital-os/laravel-folder-watcher/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnhdigital-os%2Flaravel-folder-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhnhdigital-os%2Flaravel-folder-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnhdigital-os%2Flaravel-folder-watcher/lists"}