| // Do not edit directly! |
| // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page |
| = File Watch |
| :page-aliases: extensions/file-watch.adoc |
| :linkattrs: |
| :cq-artifact-id: camel-quarkus-file-watch |
| :cq-native-supported: true |
| :cq-status: Stable |
| :cq-status-deprecation: Stable |
| :cq-description: Get notified about file events in a directory using java.nio.file.WatchService. |
| :cq-deprecated: false |
| :cq-jvm-since: 1.0.0 |
| :cq-native-since: 1.0.0 |
| |
| [.badges] |
| [.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native since##[.badge-supported]##1.0.0## |
| |
| Get notified about file events in a directory using java.nio.file.WatchService. |
| |
| == What's inside |
| |
| * xref:{cq-camel-components}::file-watch-component.adoc[File Watch component], URI syntax: `file-watch:path` |
| |
| Please refer to the above link for usage and configuration details. |
| |
| == Maven coordinates |
| |
| https://code.quarkus.io/?extension-search=camel-quarkus-file-watch[Create a new project with this extension on code.quarkus.io, window="_blank"] |
| |
| Or add the coordinates to your existing project: |
| |
| [source,xml] |
| ---- |
| <dependency> |
| <groupId>org.apache.camel.quarkus</groupId> |
| <artifactId>camel-quarkus-file-watch</artifactId> |
| </dependency> |
| ---- |
| |
| Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. |
| |
| == Camel Quarkus limitations |
| |
| The underlying Camel component configures the Directory Watcher in a platform specific way: |
| |
| * On Mac, the `io.methvin.watchservice.MacOSXListeningWatchService` is used that depends on |
| `https://github.com/java-native-access/jna[net.java.dev.jna:jna]`. |
| * Other platforms use `java.nio.file.WatchService` provided by the Java Runtime. |
| |
| Because JNA is https://github.com/oracle/graal/issues/673[not supported on GraalVM] yet, we made the component to behave differently on Camel Quarkus: We are substituting the respective Directory Watcher method do use the stock `java.nio.file.WatchService` also on Mac. |
| |