Interface Scanner.DiscreteListener
- All Superinterfaces:
Scanner.Listener
- All Known Implementing Classes:
KeyStoreScanner, PropertyUserStore
- Enclosing class:
Scanner
Notification of exact file changes in the last scan.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled when a file is added.default voidfileChanged(String filename) Called when a file is changed.default voidfileRemoved(String filename) Called when a file is removed.default voidCalled when a file is added.default voidpathChanged(Path path) Called when a file is changed.default voidpathRemoved(Path path) Called when a file is removed.
-
Method Details
-
pathChanged
Called when a file is changed. Default implementation callsfileChanged(String).- Parameters:
path- thePath.toRealPath(LinkOption...)of the changed file- Throws:
Exception- May be thrown for handling errors
-
pathAdded
Called when a file is added. Default implementation callsfileAdded(String).- Parameters:
path- thePath.toRealPath(LinkOption...)of the added file- Throws:
Exception- May be thrown for handling errors
-
pathRemoved
Called when a file is removed. Default implementation callsfileRemoved(String).- Parameters:
path- thePath.toRealPath(LinkOption...)of the removed file- Throws:
Exception- May be thrown for handling errors
-
fileChanged
Called when a file is changed. May not be called ifpathChanged(Path)is overridden.- Parameters:
filename- thePath.toRealPath(LinkOption...)as a string of the changed file- Throws:
Exception- May be thrown for handling errors
-
fileAdded
Called when a file is added. May not be called ifpathAdded(Path)is overridden.- Parameters:
filename- thePath.toRealPath(LinkOption...)as a string of the added file- Throws:
Exception- May be thrown for handling errors
-
fileRemoved
Called when a file is removed. May not be called ifpathRemoved(Path)is overridden.- Parameters:
filename- thePath.toRealPath(LinkOption...)as a string of the removed file- Throws:
Exception- May be thrown for handling errors
-