Class FileChangedEvent

java.lang.Object
java.util.EventObject
io.micronaut.context.event.ApplicationEvent
io.micronaut.scheduling.io.watch.event.FileChangedEvent
All Implemented Interfaces:
Serializable

public class FileChangedEvent extends ApplicationEvent
Event fired when a file that is being watched changes.
Since:
1.1.0
Author:
graemerocher
See Also:
  • Constructor Details

    • FileChangedEvent

      public FileChangedEvent(@NonNull Path path, @NonNull WatchEventType eventType)
      Constructs a new file changed event.
      Parameters:
      path - The path
      eventType - The event type
    • FileChangedEvent

      public FileChangedEvent(@NonNull Path path, @NonNull WatchEvent.Kind eventType)
      Constructs a new file changed event.
      Parameters:
      path - The path
      eventType - The event type
  • Method Details

    • getSource

      public @NonNull Path getSource()
      Overrides:
      getSource in class EventObject
    • getPath

      public @NonNull Path getPath()
      The path to the file / directory that changed.
      Returns:
      The path
    • getEventType

      public @NonNull WatchEventType getEventType()
      The watch event type.
      Returns:
      The event type