4
0

onfilechanged.adoc 631 B

123456789101112131415161718192021222324252627
  1. [#exec-file-changed]
  2. = Execute on file changed
  3. You can execute an action when a file is changed in a directory. The argument `filename` is pre-populated for you.
  4. [source,yaml]
  5. ----
  6. actions:
  7. - title: Print names of new files
  8. shell: "echo Filename: {{ filename }} Filedir: {{ filedir }} Filext: {{ fileext }}"
  9. arguments:
  10. - name: filename
  11. type: unicode_identifier
  12. - name: filedir
  13. type: unicode_identifier
  14. - name: fileext
  15. type: unicode_identifier
  16. execOnFileChangedInDir:
  17. - /home/user/Downloads/
  18. ----
  19. include::partial$action_execution/onfileindir_arguments.adoc[]