isEnabledboolean isEnabled()Should this listener be enabled?
You often want to use such file modifications listeners only during development, for autoreload purposes. In production, you would disable it.
When this method return
false, the listener is not registered, at all.
A common pattern for this method is to use:
getFilesToWatchThe file(s) to watch.
(File modifiedFile)Called when the watched file(s) are modified.
Receives the file that was modified.
The method is called in a new Thread.