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 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |