|
Crossfire JXClient, Trunk
|

Static Public Member Functions | |
| static void | main (String[] args) throws IOException |
Package Functions | |
| static< T > WatchEvent< T > | cast (WatchEvent<?> event) |
| void | processEvents () |
| WatchDir (Path dir, boolean recursive) throws IOException | |
Static Package Functions | |
| static void | usage () |
Private Member Functions | |
| void | register (Path dir) throws IOException |
| void | registerAll (final Path start) throws IOException |
Private Attributes | |
| int | count |
| final boolean | recursive |
| boolean | trace = false |
| final WatchService | watcher |
Example to watch a directory (or tree) for changes to files.
Definition at line 51 of file WatchDir.java.
|
package |
Creates a WatchService and registers the given directory
Definition at line 93 of file WatchDir.java.
References recursive, and registerAll().
Referenced by main().


|
package |
Definition at line 59 of file WatchDir.java.
Referenced by processEvents().

|
static |
Definition at line 168 of file WatchDir.java.
References recursive, usage(), and WatchDir().

|
package |
Process all events for keys queued to the watcher
Definition at line 112 of file WatchDir.java.
References cast(), count, name(), recursive, registerAll(), and watcher.

|
private |
Register the given directory with the WatchService
Definition at line 66 of file WatchDir.java.
|
private |
Register the given directory, and all its sub-directories, with the WatchService.
Definition at line 77 of file WatchDir.java.
Referenced by processEvents(), and WatchDir().

|
staticpackage |
Definition at line 163 of file WatchDir.java.
Referenced by main().

|
private |
Definition at line 56 of file WatchDir.java.
Referenced by processEvents(), and register().
|
private |
Definition at line 54 of file WatchDir.java.
Referenced by main(), processEvents(), and WatchDir().
|
private |
Definition at line 55 of file WatchDir.java.
Referenced by register().
|
private |
Definition at line 53 of file WatchDir.java.
Referenced by processEvents(), and register().
1.8.17