Compare the files named *f1* and *f2*, returning ``True`` if they seem equal,
``False`` otherwise.
- If *shallow* is true, files with identical :func:`os.stat` signatures are
- taken to be equal. Otherwise, the contents of the files are compared.
+ If *shallow* is true and the :func:`os.stat` signatures (file type, size, and
+ modification time) of both files are identical, the files are taken to be
+ equal.
+
+ Otherwise, the files are treated as different if their sizes or contents differ.
Note that no external programs are called from this function, giving it
portability and efficiency.
f2 -- Second file name
- shallow -- Just check stat signature (do not read the files).
- defaults to True.
+ shallow -- treat files as identical if their stat signatures (type, size,
+ mtime) are identical. Otherwise, files are considered different
+ if their sizes or contents differ. [default: True]
Return value: