AlkantarClanX12
Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/ |
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/filecmp.cpython-33.pyo |
� ��f}% c @ s� d Z d d l Z d d l Z d d l m Z d d d g Z i Z d Z d d d � Z d d � Z d d � Z Gd d � d � Z d d d � Z e e d d � Z d d � Z d d � Z e d k r� e � n d S( u� Utilities for comparing files and directories. Classes: dircmp Functions: cmp(f1, f2, shallow=True) -> int cmpfiles(a, b, common) -> ([], [], []) i N( u filterfalseu cmpu dircmpu cmpfilesi i c C s� t t j | � � } t t j | � � } | d t j k sP | d t j k rT d S| rj | | k rj d S| d | d k r� d St j | | | | f � } | d k r� t | | � } t t � d k r� t j � n | t | | | | f <n | S( u� 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 FTN( u _sigu osu statu S_IFREGu Falseu Trueu _cacheu getu Noneu _do_cmpu lenu clear( u f1u f2u shallowu s1u s2u outcome( ( u, /opt/alt/python33/lib64/python3.3/filecmp.pyu cmp s & c C s t j | j � | j | j f S( N( u statu S_IFMTu st_modeu st_sizeu st_mtime( u st( ( u, /opt/alt/python33/lib64/python3.3/filecmp.pyu _sig; s u _sigc C sx t } t | d � �] } t | d � �E } x; | j | � } | j | � } | | k r[ d S| s- d Sq- Wd QXWd QXd S( Nu rbFT( u BUFSIZEu openu readu Falseu True( u f1u f2u bufsizeu fp1u fp2u b1u b2( ( u, /opt/alt/python33/lib64/python3.3/filecmp.pyu _do_cmp@ s $u _do_cmpc B s� | Ee Z d Z d Z d$ d$ d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z e d e d e d e d e d e d e d e d e d e d e d e d! e � Z d"