| Constructor and Description |
|---|
WatchableDirectory(File directory)
Construct an observer for the specified directory.
|
WatchableDirectory(File directory,
FileFilter fileFilter)
Construct an observer for the specified directory and file filter.
|
WatchableDirectory(String directoryName)
Construct an observer for the specified directory.
|
WatchableDirectory(String directoryName,
FileFilter fileFilter)
Construct an observer for the specified directory and file filter.
|
| Modifier and Type | Method and Description |
|---|---|
Result |
check()
Check file alteration.
|
void |
destroy()
Final processing.
|
void |
initialize()
Initialize the observer.
|
void |
onFileChange(File file) |
void |
onFileCreate(File file) |
void |
onFileDelete(File file) |
public WatchableDirectory(String directoryName)
directoryName - the name of the directory to observepublic WatchableDirectory(String directoryName, FileFilter fileFilter)
directoryName - the name of the directory to observefileFilter - The file filter or null if nonepublic WatchableDirectory(File directory)
directory - the directory to observepublic WatchableDirectory(File directory, FileFilter fileFilter)
directory - the directory to observefileFilter - The file filter or null if nonepublic void initialize()
Watchableinitialize in interface Watchablepublic void destroy()
Watchablepublic void onFileCreate(File file)
onFileCreate in interface org.apache.commons.io.monitor.FileAlterationListeneronFileCreate in class org.apache.commons.io.monitor.FileAlterationListenerAdaptorpublic void onFileChange(File file)
onFileChange in interface org.apache.commons.io.monitor.FileAlterationListeneronFileChange in class org.apache.commons.io.monitor.FileAlterationListenerAdaptorpublic void onFileDelete(File file)
onFileDelete in interface org.apache.commons.io.monitor.FileAlterationListeneronFileDelete in class org.apache.commons.io.monitor.FileAlterationListenerAdaptorCopyright © 2014-2015 Opoo.org. All Rights Reserved.