Package com.codingchili.core.files
Class FileWatcherBuilder
java.lang.Object
com.codingchili.core.files.FileWatcherBuilder
File watcher builder.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs the new FileWatcher.onDirectory(String directory)
Defines the directory that should be watched relative from the application root.rate(TimerSource rate)
The rate in which to poll the file change events.withListener(FileStoreListener listener)
Sets the listener that is called on file changes.
-
Method Details
-
withListener
Sets the listener that is called on file changes.- Parameters:
listener
- the listener to be used.- Returns:
- fluent.
-
onDirectory
Defines the directory that should be watched relative from the application root.- Parameters:
directory
- the directory to be watched, includes its subdirectories.- Returns:
- fluent
-
rate
The rate in which to poll the file change events.- Parameters:
rate
- a timersource in milliseconds.- Returns:
- fluent
-
build
Constructs the new FileWatcher.- Returns:
- fluent
-