0

it sounds like a stupid question and maybe I'm just blocked by whatever ... Using the new NIO2 of Java I can perfectly track the occurrance of new files, I can parse them and send the content so somewhere. But I have no glue how I can easily track the update and read the new stuff only ....

As always: any hint appreciated

Subcomandante
  • 403
  • 1
  • 6
  • 14

1 Answers1

0

You track the update by watching the parent directory for ENTRY_MODIFY.

Now for the bad news: Nothing in the Java in API tells you what is new. To learn about the new stuff you can use several methods e.g.

a) keep a copy of interesting files and send the diff

b) use a wrapping filesystem that hooks into writing and sends from there

openCage
  • 2,735
  • 1
  • 18
  • 24