2

Using JNotify in project and it fulfill my all requirements, but some times it show inconsistent behavior like

Some time when I cut and paste (Drag and drop) any folder to my root folder it only read the folder not child of that folder (I just pasted) and some times it read all the child files and folder

Some times when I delete folder it only gives message of deletion of that folder (and delete that folder and all its child) and some time it also show its child.

halfer
  • 19,824
  • 17
  • 99
  • 186
NoNaMe
  • 6,020
  • 30
  • 82
  • 110
  • @DenisTulskiy This application will be used by the windows xp(and above versions ) also MAC users – NoNaMe Sep 14 '12 at 11:27
  • 2
    that's great but on which OS do you reproduce the problem? JNotify's documentation says that on MacOSX several events may be merged into one if they happen too quickly. Maybe that's the case here. – Denis Tulskiy Sep 14 '12 at 11:29
  • @DenisTulskiy Now it creates problem at windows XP – NoNaMe Sep 14 '12 at 11:31
  • @DenisTulskiy do you have any idea about it, or if you can tell about any other java file watcher. – NoNaMe Sep 14 '12 at 11:42
  • 1
    no, sorry, I haven't worked with jnotify. The only suggestion I have is to use java 7, file watching is native there. making your users install it on macosx would be a problem though. – Denis Tulskiy Sep 14 '12 at 12:02
  • it does not fulfill my all requirements like rename file/folder that is why not using that. – NoNaMe Sep 14 '12 at 12:17
  • it's very hard to understand what you're asking, especially considering the potential problems are mentioned in the documentation http://jnotify.sourceforge.net/macos.html – kritzikratzi Sep 19 '12 at 00:02
  • @kritzikratzi but this time my issue is with windows, and this is inconsistent as during cut past of a folder it shows 2 different response 1st is some time it past inner files/folder with all child/sub child but some times not it is 2nd response what you will say now – NoNaMe Sep 19 '12 at 04:59
  • can you formulate your problem more directly? maybe a little snippet of code, what you expect it to do, and what it actually does? – kritzikratzi Sep 20 '12 at 00:02

1 Answers1

4

It looks like limitation in implementation of JNotify.

Look at another approaches of File/directory polling to detect change

cubanacan
  • 644
  • 1
  • 9
  • 26