Module 
Package org.xnio

Interface FileSystemWatcher

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface FileSystemWatcher
    extends java.io.Closeable
    File system watcher service. This watcher can be used to receive notifications about a specific path.
    Author:
    Stuart Douglas
    • Method Detail

      • watchPath

        void watchPath​(java.io.File file,
                       FileChangeCallback callback)
        Watch the given path recursively, and invoke the callback when a change is made.
        Parameters:
        file - The path to watch
        callback - The callback
      • unwatchPath

        void unwatchPath​(java.io.File file,
                         FileChangeCallback callback)
        Stop watching a path.
        Parameters:
        file - the path
        callback - the callback