Moving open files

Marcin ‘Qrczak’ Kowalczyk qrczak at knm.org.pl
Tue Jul 8 15:30:14 UTC 2008


2008/7/8 Derek Broughton <news at pointerstop.ca>:

> There's no possible way for OO or _any_ other program to know what somebody
> has done with a file outside that program,

> The best an application can do is
> compare the original file (or a checksum of it) to the current file before
> writing to it, and warn the user if it has been changed.

There is no need to compute a checksum; comparing the last modified
time yields the same result in practice, and is cheaper.

For example Emacs warns if the time has changed (at least on save and
on the first editing action).

-- 
Marcin Kowalczyk
qrczak at knm.org.pl
http://qrnik.knm.org.pl/~qrczak/




More information about the ubuntu-users mailing list