Class DirectoryMonitor

java.lang.Object
java.lang.Thread
org.omegat.util.DirectoryMonitor
All Implemented Interfaces:
Runnable

public class DirectoryMonitor extends Thread
Class for monitor directory content changes. It just looks directory every x seconds and run callback if some files changed.
  • Constructor Details

  • Method Details

    • getDir

      public File getDir()
    • fin

      public void fin()
      Stop directory monitoring.
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • getExistFiles

      public Set<File> getExistFiles()
    • checkChanges

      public void checkChanges()
      Process changes in directory. This method can be called before thread start for load all files from directory immediately.