File system events library for Java

JNotify java API

JNotify is a java library that allow java application to listen to file system events, such as:

  • File created
  • File modified
  • File renamed
  • File deleted

Supported platforms

Usage example

JNotify can be tested by simply running the jar file with the followng commend:
java -Djava.library.path=. -jar jnotify-VER.jar [dir]

JNotify will then monitor the specified dir (or the current directory if dir is not specified) and print detected events. Note that java.library.path should point to the location of the native libraries that comes with jnotify (dlls, so dylibs etc).

Check out the code sample page.

转载请注明:WebLogic Android 博客 » JNotify Java 开源文件系统监控软件包