Features

jpathwatch supports all standard watch event kinds specified in Java 7 (ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY), which allow you to monitor a directory for files being created, deleted and changed.

However, some operating systems provide support for additional event kinds (like file renaming) and advanced monitoring capabilities, which are accessible via modifiers.

The following table summarises the features that are available on each host platform:

event kind description Windows Linux Mac OS X FreeBSD Others
StandardWatchEventKind.ENTRY_CREATE file created Yes Yes Yes Yes Yes*
StandardWatchEventKind.ENTRY_DELETE file deleted Yes Yes Yes Yes Yes*
StandardWatchEventKind.ENTRY_MODIFY file written to/modified Yes Yes Yes* Yes* Yes*
ExtendedWatchEventKind.ENTRY_RENAME_FROM file renamed (old name) Yes Yes No No No
ExtendedWatchEventKind.ENTRY_RENAME_TO file renamed (new name) Yes Yes No No No
ExtendedWatchEventKind.KEY_INVALID key invalidated (by user or external event) Yes Yes Yes* Yes* Yes*

(*) indicates that specifying this event kind will cause jpathwatch to periodically poll for changes because of a limitation of the underlying operating system.

event modifier description Windows Linux Mac OS X FreeBSD Others
ExtendedWatchEventModifier.ACCURATE no event may be missed Yes Yes No No No
ExtendedWatchEventModifier.FILE_TREE recursive directory monitoring Yes No No No No
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: