Interface FileMonitoring

  • All Known Implementing Classes:
    FileMonitoringImpl

    @Contract
    public interface FileMonitoring
    Service to monitor changes to files.
    Author:
    Jerome Dochez
    • Method Detail

      • monitors

        void monitors​(File file,
                      FileMonitoring.FileChangeListener listener)
        Registers a FileChangeListener for a particular file
        Parameters:
        file - the file of interest
        listener - the listener to notify
      • fileModified

        void fileModified​(File file)
        Informs the monitor that a file has been changed. This is a hint to the monitor to prevent missing changes that occur within the granularity of the operating system's file modification time, typically 1 second.