| BowlerKernel
    | 

| Public Member Functions | |
| void | addIFileChangeListener (IFileChangeListener l) | 
| void | removeIFileChangeListener (IFileChangeListener l) | 
| void | watch () | 
| File | getFileToWatch () | 
| void | setFileToWatch (File fileToWatch) | 
| boolean | isRun () | 
| void | close () | 
| Static Public Member Functions | |
| static void | clearAll () | 
| static void | notifyOfDelete (File fileToWatch) | 
| static void | close (File fileToWatch) | 
| static FileChangeWatcher | watch (File fileToWatch) throws IOException | 
| Private Member Functions | |
| FileChangeWatcher (File fileToWatch) throws IOException | |
| void | register (Path dir) throws IOException | 
| void | registerAll (final Path start) throws IOException | 
| Private Attributes | |
| File | fileToWatch | 
| boolean | run = true | 
| final WatchService | watcher | 
| final Map< WatchKey, Path > | keys | 
| final boolean | recursive = false | 
| ArrayList< IFileChangeListener > | listeners = new ArrayList<IFileChangeListener>() | 
| Thread | watcherThread = null | 
| Static Private Attributes | |
| static boolean | runThread = true | 
| static HashMap< String, FileChangeWatcher > | activeListener = new HashMap<String, FileChangeWatcher>() | 
The Class FileChangeWatcher.
Definition at line 48 of file FileChangeWatcher.java.
| 
 | private | 
Instantiates a new file change watcher.
| fileToWatch | the file to watch | 
| IOException | Signals that an I/O exception has occurred. | 
Definition at line 130 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.recursive, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.registerAll(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.run, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.setFileToWatch(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watcherThread.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().

| void com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.addIFileChangeListener | ( | IFileChangeListener | l | ) | 
Adds the i file change listener.
| l | the l | 
Definition at line 178 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.listeners.
Referenced by com.neuronrobotics.bowlerstudio.creature.MobileBaseCadManager.scriptFromFileInfo(), and com.neuronrobotics.bowlerstudio.util.FileWatchDeviceWrapper.watch().
| 
 | static | 
clear the listeners
Definition at line 78 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.activeListener.
| void com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.close | ( | ) | 
Close.
Definition at line 353 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.activeListener, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch, and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watcher.
| 
 | static | 
Definition at line 98 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.activeListener, and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch.
Referenced by com.neuronrobotics.bowlerstudio.creature.MobileBaseCadManager.closeScriptFromFileInfo(), and com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.deleteFolder().
| File com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.getFileToWatch | ( | ) | 
Gets the file to watch.
Definition at line 327 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| boolean com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.isRun | ( | ) | 
Checks if is run.
Definition at line 346 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.run.
| 
 | static | 
Definition at line 87 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.activeListener, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch, and com.neuronrobotics.bowlerstudio.util.IFileChangeListener.onFileDelete().
Referenced by com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine.deleteFolder().

| 
 | private | 
Register the given directory with the WatchService.
| dir | the dir | 
| IOException | Signals that an I/O exception has occurred. | 
Definition at line 221 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.keys, and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watcher.
| 
 | private | 
Register the given directory, and all its sub-directories, with the WatchService.
| start | the start | 
| IOException | Signals that an I/O exception has occurred. | 
Definition at line 245 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher().
| void com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.removeIFileChangeListener | ( | IFileChangeListener | l | ) | 
Removes the i file change listener.
| l | the l | 
Definition at line 190 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.listeners.
Referenced by com.neuronrobotics.bowlerstudio.creature.MobileBaseCadManager.scriptFromFileInfo(), and com.neuronrobotics.bowlerstudio.util.FileWatchDeviceWrapper.watch().
| void com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.setFileToWatch | ( | File | fileToWatch | ) | 
Sets the file to watch.
| fileToWatch | the new file to watch | 
Definition at line 337 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher().
| void com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch | ( | ) | 
Perfom the watch execution
Definition at line 259 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.getFileToWatch(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.keys, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.listeners, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.run, and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watcher.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher().

| 
 | static | 
Start watching a file
| fileToWatch | a file that should be watched | 
| IOException | 
Definition at line 113 of file FileChangeWatcher.java.
References com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.activeListener, com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.fileToWatch.
Referenced by com.neuronrobotics.bowlerstudio.creature.MobileBaseCadManager.scriptFromFileInfo(), and com.neuronrobotics.bowlerstudio.util.FileWatchDeviceWrapper.watch().

| 
 | staticprivate | 
Definition at line 69 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.clearAll(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.close(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.notifyOfDelete(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| 
 | private | 
The file to watch.
Definition at line 51 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.close(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.getFileToWatch(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.notifyOfDelete(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.setFileToWatch(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| 
 | private | 
The keys.
Definition at line 60 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.register(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| 
 | private | 
The listeners.
Definition at line 66 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.addIFileChangeListener(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.removeIFileChangeListener(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| 
 | private | 
The recursive.
Definition at line 63 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher().
| 
 | private | 
The run.
Definition at line 54 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.isRun(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| 
 | staticprivate | 
Definition at line 67 of file FileChangeWatcher.java.
| 
 | private | 
The watcher.
Definition at line 57 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.close(), com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.register(), and com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.watch().
| 
 | private | 
Definition at line 70 of file FileChangeWatcher.java.
Referenced by com.neuronrobotics.bowlerstudio.util.FileChangeWatcher.FileChangeWatcher().