org.apache.commons.io.monitor

## Interface FileAlterationListener

- All Known Implementing Classes:
    FileAlterationListenerAdaptor

      public interface FileAlterationListener

  Receives events of file system modifications.

  Register `FileAlterationListener`s with a `FileAlterationObserver`.

  Since:
    2.0
  See Also:
    `FileAlterationObserver`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onDirectoryChange(File directory)` Directory changed Event.
    `void` | `onDirectoryCreate(File directory)` Directory created Event.
    `void` | `onDirectoryDelete(File directory)` Directory deleted Event.
    `void` | `onFileChange(File file)` File changed Event.
    `void` | `onFileCreate(File file)` File created Event.
    `void` | `onFileDelete(File file)` File deleted Event.
    `void` | `onStart(FileAlterationObserver observer)` File system observer started checking event.
    `void` | `onStop(FileAlterationObserver observer)` File system observer finished checking event.

- - ### Method Detail

    - #### onDirectoryChange

          void onDirectoryChange(File directory)

      Directory changed Event.
      Parameters:
        `directory` - The directory changed

    - #### onDirectoryCreate

          void onDirectoryCreate(File directory)

      Directory created Event.
      Parameters:
        `directory` - The directory created

    - #### onDirectoryDelete

          void onDirectoryDelete(File directory)

      Directory deleted Event.
      Parameters:
        `directory` - The directory deleted

    - #### onFileChange

          void onFileChange(File file)

      File changed Event.
      Parameters:
        `file` - The file changed

    - #### onFileCreate

          void onFileCreate(File file)

      File created Event.
      Parameters:
        `file` - The file created

    - #### onFileDelete

          void onFileDelete(File file)

      File deleted Event.
      Parameters:
        `file` - The file deleted

    - #### onStart

          void onStart(FileAlterationObserver observer)

      File system observer started checking event.
      Parameters:
        `observer` - The file system observer

    - #### onStop

          void onStop(FileAlterationObserver observer)

      File system observer finished checking event.
      Parameters:
        `observer` - The file system observer

Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.