Current File : //opt/RZpython2/lib/python2.7/filecmp.pyc |
�
��#ec @ s� d Z d d l Z d d l Z d d l m Z m Z m Z m Z d d d g Z i Z d Z
d d
� Z d � Z d � Z
d d d
� � YZ d d � Z e e d � Z d � Z d � Z e d k r� e � n d S( s� Utilities for comparing files and directories.
Classes:
dircmp
Functions:
cmp(f1, f2, shallow=1) -> int
cmpfiles(a, b, common) -> ([], [], [])
i����N( t ifiltert ifilterfalset imapt izipt cmpt dircmpt cmpfilesi i i c C s� t t j | � � } t t j | � � } | d t j k sP | d t j k rT t S| rj | | k rj t S| d | d k r� t St j | | | | f � } | d k r� t | | � } t
t � d k r� t j � n | t | | | | f <n | S( s� 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.
Return value:
True if the files are the same, False otherwise.
This function uses a cache for past comparisons and the results,
with a cache invalidation mechanism relying on stale signatures.
i i id N( t _sigt ost statt S_IFREGt Falset Truet _cachet gett Nonet _do_cmpt lent clear( t f1t f2t shallowt s1t s2t outcome( ( s'