

The WatchService API is fairly low level, allowing you to customize it. Creating a Watch Service and Registering for Events.When an event comes in, it is handled as needed. The registered process has a thread (or a pool of threads) dedicated to watching for any events it has registered for. When the service detects an event of interest, it is forwarded to the registered process. When registering, you tell the service which types of events you are interested in: file creation, file deletion, or file modification. This API enables you to register a directory (or directories) with the watch service. The package provides a file change notification API, called the Watch Service API. It does not scale to applications that have hundreds of open files or directories to monitor. One way to do so is to poll the file system looking for changes, but this approach is inefficient. To implement this functionality, called file change notification, a program must be able to detect what is happening to the relevant directory on the file system. JEdit Dialog Box Showing That a Modified File Is Detected


#MONITER NEWLY ADDED FILES USING FILEWATCHER FREE#
The following sample dialog box shows how this notification looks with the free editor, Have you ever found yourself editing a file, using an IDE or another editor, and a dialog box appears to inform you that one of the open files has changed on the file system and needs to be reloaded? Or perhaps, like the NetBeans IDE, the application just quietly updates the file without notifying you.
