| | |
- _do_cmp(f1, f2)
- _sig(st)
- cmp(f1, f2, shallow=1, use_statcache=0)
- Compare two files.
Arguments:
f1 -- First file name
f2 -- Second file name
shallow -- Just check stat signature (do not read the files).
defaults to 1.
use_statcache -- Do not stat() each file directly: go through
the statcache module for more efficiency.
Return value:
integer -- 1 if the files are the same, 0 otherwise.
This function uses a cache for past comparisons and the results,
with a cache invalidation mechanism relying on stale signatures.
Of course, if 'use_statcache' is true, this mechanism is defeated,
and the cache will never grow stale.
|