Better doc for file watcher

This commit is contained in:
An Phan 2016-02-02 18:26:38 +08:00
parent 03d6c06aef
commit eff010149e
2 changed files with 9 additions and 8 deletions

View file

@ -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:
* "<changed_path> <event_flag_1>::<event_flag_2>::<event_flag_n>"
* 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)

View file

@ -140,7 +140,13 @@ class Media
* "<changed_path> <event_flag_1>::<event_flag_2>::<event_flag_n>"
* 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.