File2

Inbuilt file system watch and filter component: files/folders can be filtered and react to multiple selection criteria and optionally moved upon selection for processing.

For more information about File2: https://camel.apache.org/file2.html.

Example

Template: Dev_BaseRoute.groovy

${addRoutes} :=

// Copy *.xml from "/opt/b2box5.data/resources/ftp.in" to "/opt/b2box5.data/tmp" and original files moved to ".processed" subdirectory
from("file:/opt/b2box5.data/resources/ftp.in?antInclude=*.xml&move=.processed")
    .to("file:/opt/b2box5.data/tmp")
    // Call script to process the moved input file
    .to( "p6cmb://scripts?platform6.request.action=execute&id=RestTank" )
    .routeId("myFile2Route")

${destroyRoutes} :=

p6.camel.destroyRoute('myFile2Route')