| Constructor and Description |
|---|
FileWatcher(Path watchFile)
Creates an instance of
FileWatcher to watch the given file. |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
beforeFileWatch(String fileContents)
This method will execute before watching the file for changes.
|
abstract void |
onCreate(String fileContents)
This method will be called when the file creation is detected.
|
abstract void |
onDelete()
This method will be called when the file deletion is detected.
|
abstract void |
onModified(String fileContents)
This method will be called when the file modification is detected.
|
void |
run() |
public FileWatcher(Path watchFile) throws FileWatcherException
FileWatcher to watch the given file.watchFile - file to be watchedFileWatcherException - thrown when error on creating an instance of FileWatcherpublic abstract void beforeFileWatch(String fileContents) throws FileWatcherException
fileContents - contents of the file to be watchedFileWatcherException - thrown when error on executing before file watch methodpublic abstract void onCreate(String fileContents) throws FileWatcherException
fileContents - contents of the file createdFileWatcherException - thrown when error on executing creation methodpublic abstract void onModified(String fileContents) throws FileWatcherException
fileContents - contents of the file modifiedFileWatcherException - thrown when error on executing modification methodpublic abstract void onDelete()
Copyright © 2019 WSO2. All rights reserved.