Class FileWatcher.FileSystemWatcher

  • Enclosing class:
    FileWatcher

    static class FileWatcher.FileSystemWatcher
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<java.nio.file.Path> watching  
      private java.nio.file.WatchService watchService  
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSystemWatcher​(java.nio.file.FileSystem fs)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addPath​(java.nio.file.Path path)  
      (package private) void close()  
      (package private) void watch​(java.util.function.BiConsumer<java.nio.file.Path,​java.lang.String> changed)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • watchService

        private final java.nio.file.WatchService watchService
      • watching

        private final java.util.Set<java.nio.file.Path> watching
    • Constructor Detail

      • FileSystemWatcher

        FileSystemWatcher​(java.nio.file.FileSystem fs)
                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • addPath

        void addPath​(java.nio.file.Path path)
              throws java.io.IOException
        Throws:
        java.io.IOException
      • watch

        void watch​(java.util.function.BiConsumer<java.nio.file.Path,​java.lang.String> changed)
            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • close

        void close()