Issue with WatchService on Mac OS 10.9.1 using Oracle JDK 1.7.0_51
Alan Bateman
Alan.Bateman at oracle.com
Wed Jan 15 10:52:51 PST 2014
On 15/01/2014 18:00, Christian Schlichtherle wrote:
> Hi Alan,
>
> thanks for your swift response. Yes, I forgot to add the code which actually creates the file „foo“. It’s supposed to be created before this „script“ runs.
>
The polling WatchService records the last modified date of each file
when you register the directory. If you modify the file quickly that
doesn't cause the modified time to change (and granularity is 1s) then
the change won't be notified. It would be interested to put in a
sleep(2000) after you create the file and then verify that you get the
modify event consistently.
-Alan.
More information about the nio-discuss
mailing list