Modify Event does not trigger when I add or remove contents from a file in a watched folder. Instead a CREATE followed by a DELETED events are triggered.
Currently using 0.94
To reproduce this:
1) On Mac OXS Lion, watch a folder
2) add a file
3) modify the contents of that file
No MODIFY event is triggered as explained above.
I am attaching sample Java code that i am running with JDK 1.6 on Mac OSX Lion
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Sample Java Program to support bug
How are you modifying the file?
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I am using TextEdit to modify the file but the it also happens when i use any other editor.
Thanks
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
If i use "nano" it works fine.
If i use "vi" the bug reported above happens
If i use textedit the bug reported above happens
If i use Word for Mac it works fine ...
... The point is that it's not consistent, is there anything i can do to fix this?
Thanks
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Saving from TextEdit gives the following:
"created /Users/alessiofailla/Documents/myjtest : myfile //called by net.contentobjects.jnotify.macosx.JNotifyAdapterMacOSX.(batchEndEvent):[655] -:
deleted /Users/alessiofailla/Documents/myjtest : myfile //called by net.contentobjects.jnotify.macosx.JNotifyAdapterMacOSX.(batchEndEvent):[665] -:"
this is not a bug.
what you are seeing is that most text editors actually create a new file when you save your file and not modifying the existing file.
try using an programming API to change the file.