KDirWatch question
Anders Lund
anders at alweb.dk
Mon Dec 20 17:04:26 GMT 2004
On Monday 20 December 2004 17:46, Andras Mantia wrote:
> I used to have something similar (compare by content the file as it was
> when it was opened with the version as it is when the dirty signal
> comes), but I got rid of the temporary file, and now I have to find
> another way, and would be much nicer if KDirWatch handles this job as
> it might be useful for others as well.
We don't use a temporary file. A md5sum of the document is created and stored
inside the doucment object when it is opened, and whenever it changes on
disk, a md5sum of the disk file contents is created and compared to that.
-anders
--
Homepage: http://www.alweb.dk
Jabber address: anderslund at jabber.dk
More information about the kde-core-devel
mailing list