On Tue, Feb 24, 2009 at 6:17 AM, yanshaozhiGmail
> I created a event listener to listen the燛vent.NODE_ADD events爁or specified
> path ,and I put a file into repository through webdav ,營n window XP system
> I can get jcr: data爌roperty's data not null燼ll time, however , sometime I
> can get "jcr: data" with null with mac System ,is there any different
> between the to opration system about add file node ?
Oh, yes, this can be very tricky. On the Mac, the standard behaviour
(either by applications or by the WebDAV filesystem) is something like
this IIRC: it creates a separate file with some prefix (I think
".filename" or "~filename") where the content is actually stored, then
makes the real file "filename" empty (that's why you get an empty
jcr:data sometimes) and finally moves the "~filename" file to
"filename". I can imagine other WebDAV fs clients have similar quirks.
To work around that, you could wait for some time after you got the
events, remember just the path, and then handle it later, when the
file is no longer changing.