On 12/06/2013 10:27, lee wrote:

File sizes do not reliably indicate whether a file has been modified or
not.

If the file size has changed, then your file has changed. That is 100% reliable, and is a quick and cheap check.

But if the size hasn't changed, then you still need to check something else. You can do another light check, or decide to do the heavy one.

This is also important because a hash-value is only a fingerprint, so different files have (a small chance on having) the same hash value.

The file size check makes the chance even smaller that you don't detect the change.

--
Ruud


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to