public class FileMonitor extends Object
FileMonitorManager.createFileMonitor(IFileMonitorCallback) to use
this class effectively. All files that have the same callback (
IFileMonitorCallback) can be encapsulated in the same
FileMonitor.| Constructor and Description |
|---|
FileMonitor(IFileMonitorCallback aListener) |
| Modifier and Type | Method and Description |
|---|---|
EChange |
addMonitoredFile(File aFile)
Adds a file to be monitored.
|
IFileMonitorCallback |
getListener() |
boolean |
isRecursive()
Access method to get the recursive setting when adding files for
monitoring.
|
EChange |
removeMonitoredFile(File aFile)
Removes a file from being monitored.
|
FileMonitor |
setRecursive(boolean bRecursive)
Access method to set the recursive setting when adding files for
monitoring.
|
String |
toString() |
public FileMonitor(@Nonnull IFileMonitorCallback aListener)
@Nonnull public IFileMonitorCallback getListener()
null.public boolean isRecursive()
true if monitoring is enabled for children.@Nonnull public FileMonitor setRecursive(boolean bRecursive)
bRecursive - true if monitoring should be enabled for children,
false otherwise.@Nonnull public EChange addMonitoredFile(@Nonnull File aFile)
aFile - The File to monitor.EChange@Nonnull public EChange removeMonitoredFile(@Nonnull File aFile)
aFile - The File to remove from monitoring.EChangeCopyright © 2014–2015 Philip Helger. All rights reserved.