Interface Scanner.DiscreteListener

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void fileAdded​(java.lang.String filename)
      Called when a file is added.
      void fileChanged​(java.lang.String filename)
      Called when a file is changed.
      void fileRemoved​(java.lang.String filename)
      Called when a file is removed.
      default void pathAdded​(java.nio.file.Path path)
      Called when a file is added.
      default void pathChanged​(java.nio.file.Path path)
      Called when a file is changed.
      default void pathRemoved​(java.nio.file.Path path)
      Called when a file is removed.
    • Method Detail

      • pathChanged

        default void pathChanged​(java.nio.file.Path path)
                          throws java.lang.Exception
        Called when a file is changed. Default implementation calls fileChanged(String).
        Parameters:
        path - the Path.toRealPath(LinkOption...) of the changed file
        Throws:
        java.lang.Exception - May be thrown for handling errors
      • pathAdded

        default void pathAdded​(java.nio.file.Path path)
                        throws java.lang.Exception
        Called when a file is added. Default implementation calls fileAdded(String).
        Parameters:
        path - the Path.toRealPath(LinkOption...) of the added file
        Throws:
        java.lang.Exception - May be thrown for handling errors
      • pathRemoved

        default void pathRemoved​(java.nio.file.Path path)
                          throws java.lang.Exception
        Called when a file is removed. Default implementation calls fileRemoved(String).
        Parameters:
        path - the Path.toRealPath(LinkOption...) of the removed file
        Throws:
        java.lang.Exception - May be thrown for handling errors
      • fileChanged

        void fileChanged​(java.lang.String filename)
                  throws java.lang.Exception
        Called when a file is changed. May not be called if pathChanged(Path) is overridden.
        Parameters:
        filename - the Path.toRealPath(LinkOption...) as a string of the changed file
        Throws:
        java.lang.Exception - May be thrown for handling errors
      • fileAdded

        void fileAdded​(java.lang.String filename)
                throws java.lang.Exception
        Called when a file is added. May not be called if pathAdded(Path) is overridden.
        Parameters:
        filename - the Path.toRealPath(LinkOption...) as a string of the added file
        Throws:
        java.lang.Exception - May be thrown for handling errors
      • fileRemoved

        void fileRemoved​(java.lang.String filename)
                  throws java.lang.Exception
        Called when a file is removed. May not be called if pathRemoved(Path) is overridden.
        Parameters:
        filename - the Path.toRealPath(LinkOption...) as a string of the removed file
        Throws:
        java.lang.Exception - May be thrown for handling errors