Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.128.28.117
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : filecmp.cpython-32.pyo
l
��bc@s�dZddlZddlZddlmZdddgZiZdZdd	�Z	d
�Z
d�ZGd�d�Zdd
�Z
ee	d�Zd�Zd�Zedkr�e�ndS(u�Utilities for comparing files and directories.

Classes:
    dircmp

Functions:
    cmp(f1, f2, shallow=True) -> int
    cmpfiles(a, b, common) -> ([], [], [])

iN(ufilterfalseucmpudircmpucmpfilesiicCs�ttj|��}ttj|��}|dtjksP|dtjkrTdS|rj||krjdS|d|dkr�dStj||||f�}|dkr�t	||�}t
t�dkr�tj�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.

    iiidFTN(u_siguosustatuS_IFREGuFalseuTrueu_cacheugetuNoneu_do_cmpulenuclear(uf1uf2ushallowus1us2uoutcome((u./usr/local/python-3.2/lib/python3.2/filecmp.pyucmps&
cCstj|j�|j|jfS(N(ustatuS_IFMTust_modeust_sizeust_mtime(ust((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu_sig;scCsxt}t|d��]}t|d��E}x;|j|�}|j|�}||kr[dS|s-dSq-WdQXWdQXdS(NurbFT(uBUFSIZEuopenureaduFalseuTrue(uf1uf2ubufsizeufp1ufp2ub1ub2((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu_do_cmp@scBs�|EeZdZddd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
ede	ded
ededededededededede�Zd�ZdS(uTA class that manages the comparison of 2 directories.

    dircmp(a, b, ignore=None, hide=None)
      A and B are directories.
      IGNORE is a list of names to ignore,
        defaults to ['RCS', 'CVS', 'tags'].
      HIDE is a list of names to hide,
        defaults to [os.curdir, os.pardir].

    High level usage:
      x = dircmp(dir1, dir2)
      x.report() -> prints a report on the differences between dir1 and dir2
       or
      x.report_partial_closure() -> prints report on differences between dir1
            and dir2, and reports on common immediate subdirectories.
      x.report_full_closure() -> like report_partial_closure,
            but fully recursive.

    Attributes:
     left_list, right_list: The files in dir1 and dir2,
        filtered by hide and ignore.
     common: a list of names in both dir1 and dir2.
     left_only, right_only: names only in dir1, dir2.
     common_dirs: subdirectories in both dir1 and dir2.
     common_files: files in both dir1 and dir2.
     common_funny: names in both dir1 and dir2 where the type differs between
        dir1 and dir2, or the name is not stat-able.
     same_files: list of identical files.
     diff_files: list of filenames which differ.
     funny_files: list of files which could not be compared.
     subdirs: a dictionary of dircmp objects, keyed by names in common_dirs.
     cCsm||_||_|dkr6tjtjg|_n	||_|dkr`dddg|_n	||_dS(NuRCSuCVSutags(ulefturightuNoneuosucurdirupardiruhideuignore(uselfuaubuignoreuhide((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu__init__os			cCsnttj|j�|j|j�|_ttj|j�|j|j�|_|jj	�|jj	�dS(N(
u_filteruosulistdiruleftuhideuignoreu	left_listurightu
right_listusort(uself((u./usr/local/python-3.2/lib/python3.2/filecmp.pyuphase0{s
cCs�ttttjj|j�|j��}ttttjj|j�|j��}tt|j	t
|j|���|_tt|j	t
|j|���|_tt|j	t
|j|���|_dS(N(udictuzipumapuosupathunormcaseu	left_listu
right_listulistu__getitem__ufilteru__contains__ucommonufilterfalseu	left_onlyu
right_only(uselfuaub((u./usr/local/python-3.2/lib/python3.2/filecmp.pyuphase1�s
**''c
Cs�g|_g|_g|_x|jD]t}tjj|j|�}tjj|j|�}d}ytj	|�}Wn.tj
k
r�}zd}WYdd}~XnXytj	|�}Wn.tj
k
r�}zd}WYdd}~XnX|r�t	j|j�}t	j|j�}	||	kr2|jj
|�q�t	j|�rT|jj
|�q�t	j|�rv|jj
|�q�|jj
|�q%|jj
|�q%WdS(Nii(ucommon_dirsucommon_filesucommon_funnyucommonuosupathujoinulefturightustatuerroruS_IFMTust_modeuappenduS_ISDIRuS_ISREG(
uselfuxua_pathub_pathuokua_statuwhyub_statua_typeub_type((u./usr/local/python-3.2/lib/python3.2/filecmp.pyuphase2�s4			cCs7t|j|j|j�}|\|_|_|_dS(N(ucmpfilesulefturightucommon_filesu
same_filesu
diff_filesufunny_files(uselfuxx((u./usr/local/python-3.2/lib/python3.2/filecmp.pyuphase3�scCssi|_xc|jD]X}tjj|j|�}tjj|j|�}t|||j|j	�|j|<qWdS(N(
usubdirsucommon_dirsuosupathujoinulefturightudircmpuignoreuhide(uselfuxua_xub_x((u./usr/local/python-3.2/lib/python3.2/filecmp.pyuphase4�s
	cCs2|j�x!|jj�D]}|j�qWdS(N(uphase4usubdirsuvaluesuphase4_closure(uselfusd((u./usr/local/python-3.2/lib/python3.2/filecmp.pyuphase4_closure�s
cCsKtd|j|j�|jrH|jj�td|jd|j�n|jrz|jj�td|jd|j�n|jr�|jj�td|j�n|jr�|jj�td|j�n|jr�|jj�td|j�n|j	r|j	j�td|j	�n|j
rG|j
j�td|j
�ndS(	NudiffuOnly inu:uIdentical files :uDiffering files :uTrouble with common files :uCommon subdirectories :uCommon funny cases :(uprintulefturightu	left_onlyusortu
right_onlyu
same_filesu
diff_filesufunny_filesucommon_dirsucommon_funny(uself((u./usr/local/python-3.2/lib/python3.2/filecmp.pyureport�s,	
	
	
	
	
	
	
cCs9|j�x(|jj�D]}t�|j�qWdS(N(ureportusubdirsuvaluesuprint(uselfusd((u./usr/local/python-3.2/lib/python3.2/filecmp.pyureport_partial_closure�s
cCs9|j�x(|jj�D]}t�|j�qWdS(N(ureportusubdirsuvaluesuprintureport_full_closure(uselfusd((u./usr/local/python-3.2/lib/python3.2/filecmp.pyureport_full_closure�s
usubdirsu
same_filesu
diff_filesufunny_filesucommon_dirsucommon_filesucommon_funnyucommonu	left_onlyu
right_onlyu	left_listu
right_listcCs<||jkrt|��n|j||�t||�S(N(u	methodmapuAttributeErrorugetattr(uselfuattr((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu__getattr__�sN(u__name__u
__module__u__doc__uNoneu__init__uphase0uphase1uphase2uphase3uphase4uphase4_closureureportureport_partial_closureureport_full_closureudictu	methodmapu__getattr__(u
__locals__((u./usr/local/python-3.2/lib/python3.2/filecmp.pyudircmpMs"
 			#		
				cCskgggf}xU|D]M}tjj||�}tjj||�}|t|||�j|�qW|S(u]Compare common files in two directories.

    a, b -- directory names
    common -- list of file names found in both directories
    shallow -- if true, do comparison based solely on stat() information

    Returns a tuple of three lists:
      files that compare equal
      files that are different
      filenames that aren't regular files.

    (uosupathujoinu_cmpuappend(uaubucommonushallowuresuxuaxubx((u./usr/local/python-3.2/lib/python3.2/filecmp.pyucmpfiles�s

!cCs;y|||||��SWntjk
r6dSYnXdS(Ni(uosuerror(uaubushuabsucmp((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu_cmpscCstt|j|��S(N(ulistufilterfalseu__contains__(uflistuskip((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu_filterscCs�ddl}ddl}|j|jdd�d�\}}t|�dkrd|jdd��nt|d|d�}d|kr�|j�n
|j�dS(	Niiuriuneed exactly two argsu-ru(u-ru(	usysugetoptuargvulenuGetoptErroruNoneudircmpureport_full_closureureport(usysugetoptuoptionsuargsudd((u./usr/local/python-3.2/lib/python3.2/filecmp.pyudemos%
u__main__i T(u__doc__uosustatu	itertoolsufilterfalseu__all__u_cacheuBUFSIZEuTrueucmpu_sigu_do_cmpudircmpucmpfilesuabsu_cmpu_filterudemou__name__(((u./usr/local/python-3.2/lib/python3.2/filecmp.pyu<module>
s &		
�			
© 2025 GrazzMean