From eff010149e910e7f5a17a55d33997a6dd29f6670 Mon Sep 17 00:00:00 2001 From: An Phan Date: Tue, 2 Feb 2016 18:26:38 +0800 Subject: [PATCH] Better doc for file watcher --- app/Console/Commands/SyncMedia.php | 9 ++------- app/Services/Media.php | 8 +++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/SyncMedia.php b/app/Console/Commands/SyncMedia.php index 3b5d9925..311f031e 100644 --- a/app/Console/Commands/SyncMedia.php +++ b/app/Console/Commands/SyncMedia.php @@ -74,14 +74,9 @@ class SyncMedia extends Command /** * SYNc a sinGLE file or directory. See my awesome pun? * - * @param string|FSWatchRecord $record An fswatch record, in this format: - * " ::::" - * The fswatch command should look like this: - * ``` bash - * $ fswatch -0x --event-flag-separator="::" $MEDIA_PATH \ - * | xargs -0 -n1 -I record php artisan koel:sync record - * ``` + * @param string|FSWatchRecord $record * + * @see SyncMedia::syncFSWatchRecord * @link https://github.com/emcrisostomo/fswatch/wiki/How-to-Use-fswatch */ public function syngle($record) diff --git a/app/Services/Media.php b/app/Services/Media.php index 8c4e6424..ad5986ad 100644 --- a/app/Services/Media.php +++ b/app/Services/Media.php @@ -140,7 +140,13 @@ class Media * " ::::" * The fswatch command should look like this: * ``` bash - * $ fswatch -0x --event-flag-separator="::" $MEDIA_PATH \ + * fswatch -0x \ + * --event=Created \ + * --event=Removed \ + * --event=Renamed \ + * --event=Updated \ + * --event-flag-separator="::" \ + * $MEDIA_PATH \ * | xargs -0 -n1 -I record php artisan koel:sync record * ``` * @param SyncMedia|null $syncCommand The SyncMedia command object, to log to console if executed by artisan.