Camel File2 Filter Over Directories
With Camel File2 you can set a filter over filenames, for instance: from("file://myfiles/dir1/dir11/?recursive=true& include=*.xml")
http://camel.apache.org/file2 Only files (not directories) are matched for valid filename, if options such as: include or exclude are used.
I'd like to filter also over filenames, something like: from("file://myfiles/dir1//.xml?recursive=true)
is this possible?
I see that there is an AntPathMatcher class that allows this type of filter: http://fusesource.com/docs/router/2.6/apidoc/org/apache/camel/core/xml/scan/AntPathMatcher.html but I don't see how to use it (without using Ant)?
Answer
The Ant path matcher is just a matcher using Ant like path styles. It does not require Ant at runtime.
See examples and documentation on this page: http://camel.apache.org/file2 at the section titled - Filtering using ANT path matcher
Related Questions
- → How to insert blob using camel SQL component with Oracle Database
- → Camel, split large XML file with header, using field condition
- → Apache Camel return producer errors
- → How to set HTTP Status code reason with Apache Camel REST DSL (Servlet/Restlet)
- → Type conversion issue with Apache Camel and Spring
- → Retrieve property send by Producer Template in camel end point
- → How to force Bindy to always return List?
- → Camel AWS SNS Exceptions
- → Getting com.thoughtworks.xstream.mapper.CannotResolveClassException while converting JSON to CSV using Apache Camel 2.25.0
- → CamelHttpResponseCode is null on service error
- → Refactor the returned SOAPFaultException to MyFaultException
- → Test a Camel sFTP endpoint
- → Camel connect to RabbitMQ queue with extra params