It it very important that the update be atomic. One must write to a scratch file-name in the same filesystem as the file you intend to replace, then set the last-write date, then rename it to the old name. If you write to the same file your are replacing, during the actual write the file is incomplete and the date is not the same as the old file. Anyone who inquires during the write will get the wrong date and an an incomplete file. I haven't looked at the code so I don't know how it is actually done. But Seth is very smart, so I assume that he is doing it correctly. Also, if he weren't he would be hearing all the time from unhappy users about inconsistent results. Rick Daniel Veillard wrote: > > On Tue, Oct 14, 2003 at 09:53:31AM -0400, seth vidal wrote: > > > Create in memory or on a temporary file, compare content, then discard > > > or actually update. Seems you're recreating the full header directory from > > > scratch, okay that works too. > > > > so I should open the current header(s) and compare the content? Why do 2 > > reads? I can just overwrite and the ones that are the same stay the > > same. > > That works too as long as the timestamp is preserved and update is atomic.