Interface FileChangeListener

All Known Implementing Classes:
LicenseManager

public interface FileChangeListener
Interface definition for a callback to be invoked when a file under watch is changed.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onFileDelete(Path filePath)
    Called when the file is deleted.
    void
    onFileModify(Path filePath)
    Called when the file is modified or created.
  • Method Details

    • onFileModify

      void onFileModify(Path filePath)
      Called when the file is modified or created. While WatchService can emit an ENTRY_CREATE event it is always paired with a ENTRY_MODIFY event and so an onFileCreate method is not provided in order to reduce duplicate messages.
      Parameters:
      filePath - The file path.
    • onFileDelete

      default void onFileDelete(Path filePath)
      Called when the file is deleted.
      Parameters:
      filePath - The file path.