[haiku-development] Monitoring file contents modifications

  • From: Michael Pfeiffer <michael.w.pfeiffer@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 7 Feb 2010 18:39:16 +0100

Hi,

In BeOS it was quite easy using the node monitor to get a notification after 
the contents of a file had changed by testing if the "opcode" field in the 
notification message was set to B_STAT_CHANGED.
Changing attribute values did not trigger that notification.
It seems in Haiku however changing an attribute also triggers B_STAT_CHANGED 
(with B_STAT_SIZE and B_STATE_MODIFICATION_TIME set in "fields" field in the 
notification message).

In BeOS maybe other file modifications (for instance changing the owner?) also 
triggered B_STATE_CHANGED. My point is that in Haiku I cannot distinguish 
between attribute modifications and file contents modifications anymore. Any 
ideas how to monitor file contents modifications in Haiku only would be 
appreciated.

Cheers,
Michael


Other related posts: