org.wamblee.io
Class DirectoryMonitor
java.lang.Object
org.wamblee.io.DirectoryMonitor
public class DirectoryMonitor
- extends Object
Monitors a directory for changes. The currernt implementation only checks
files not directories and does not check for modifications in subdirectories.
- Author:
- Erik Brakkee
|
Nested Class Summary |
static interface |
DirectoryMonitor.Listener
Listener interface to be provided by users of the directory monitor to
get notified of changes. |
|
Method Summary |
void |
poll()
Polls the directory for changes and notifies the listener of any changes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryMonitor
public DirectoryMonitor(File aDirectory,
FileFilter aFilefilter,
DirectoryMonitor.Listener aListener)
- Creates a new DirectoryMonitor object.
poll
public void poll()
- Polls the directory for changes and notifies the listener of any changes.
In case of any exceptions thrown by the listener while handling the
changes, the next call to this method will invoked the listeners again
for the same changes.
Copyright © 2011. All Rights Reserved.