On Fri, 17 Oct 2008 13:39:16 -0700, <ti*********@gmail.comwrote:
[...]
In fact, I have to know if a file has been modified between to access.
Then, if I use a crc64, it should be enough to know that file has been
modified. Ins't it ?
That depends on what your criteria is. If the CRC is different, then
yes...you know for sure that the file has been modified. But it's
possible for the CRC to be the same even though the file has changed. If
it's the same, there is a small but non-zero possibility that the file has
been changed but in a way that maps to the same CRC.
If you need to know with 100% certainty whether the file is changed, then
you have to keep a copy of it and compare byte-by-byte.
For many applications, a CRC plus a feature to allow the user to force
notification of a change is sufficient. Though, for that matter, for many
applications simply using the "Modified" timestamp provided by the OS is
sufficient. It really depends on your reliability requirements.
Pete