e)SrSSKrSSKrSSKJr SSKJr /SQr0rSr /SQr Sr SS jr S r S r"S S 5rSSjr\\ 4SjrSrSr\S:Xa\"5 gg)zUtilities for comparing files and directories. Classes: dircmp Functions: cmp(f1, f2, shallow=True) -> int cmpfiles(a, b, common) -> ([], [], []) clear_cache() N) filterfalse) GenericAlias) clear_cachecmpdircmpcmpfilesDEFAULT_IGNORESi )RCSCVStagsz.gitz.hgz.bzr_darcs __pycache__c,[R5 g)zClear the filecmp cache.N)_cacheclear-/opt/imh/python3.13/lib/python3.13/filecmp.pyrrs  LLNrc[[R"U55n[[R"U55nUS[R:wdUS[R:wagU(aX4:XagUSUS:wag[R XX445nUc3[ X5n[[5S:a [5 U[XX44'U$)aCompare two files. Arguments: f1 -- First file name f2 -- Second file name 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: True if the files are the same, False otherwise. This function uses a cache for past comparisons and the results, with cache entries invalidated if their stat information changes. The cache may be cleared by calling clear_cache(). rFTd) _sigosstatS_IFREGrget_do_cmplenr)f1f2shallows1s2outcomes rrrs. bggbk B bggbk B !u 1 528 !u1~jj"")*G"/ v;  M!(rr~ Nrcp[R"UR5URUR4$N)rS_IFMTst_modest_sizest_mtime)sts rrrFs* KK # JJ KK rcB[n[US5n[US5nURU5nURU5nXV:waSSS5 SSS5 gU(dSSS5 SSS5 gMT!,(df  O=fSSS5 g!,(df  g=f)NrbTF)BUFSIZEopenread)rr bufsizefp1fp2b1b2s rrrKsoG b$3R#'"B'"Bx !/ !/!/s4 B*A6 BA6#B4A66 B B Bc\rSrSrSrSSS.SjjrSrSrS rS r S r S r S r Sr Sr\"\ \ \ \ \\\\\\\\S9 rSr\"\5rSrg)rXaA class that manages the comparison of 2 directories. dircmp(a, b, ignore=None, hide=None, *, shallow=True) A and B are directories. IGNORE is a list of names to ignore, defaults to DEFAULT_IGNORES. HIDE is a list of names to hide, defaults to [os.curdir, os.pardir]. SHALLOW specifies whether to just check the stat signature (do not read the files). defaults to True. 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 instances (or MyDirCmp instances if this object is of type MyDirCmp, a subclass of dircmp), keyed by names in common_dirs. NTr!cXlX lUc&[R[R/UlOX@lUc [ UlOX0lXPlgr&) leftrightrcurdirpardirhider ignorer!)selfabr?r>r!s r__init__dircmp.__init__s@  <BII.DII >)DK K rc[[R"UR5URUR -5Ul[[R"UR5URUR -5UlUR R5 URR5 gr&) _filterrlistdirr:r>r? left_listr; right_listsortr@s rphase0 dircmp.phase0sx DII!6!%4;;!68!"**TZZ"8"&))DKK"79  rc [[[[RR UR 5UR 55n[[[[RR UR5UR55n[[UR[URU555Ul [[UR[URU555Ul[[UR[URU555Ulgr&)dictzipmaprpathnormcaserHrIlist __getitem__filter __contains__commonr left_only right_only)r@rArBs rphase1 dircmp.phase1s S))4>>:DNNK L S))4??;T__M N3q}}fQ^^Q.GHI c!--Q^^Q1OPQs1==+anna2PQRrc/Ul/Ul/UlURGHn[R R URU5n[R R URU5nSn[R"U5n[R"U5nU(a[R"WR5n[R"WR5nXx:waURRU5 M[R"U5(aURRU5 GM*[R "U5(aURRU5 GMcURRU5 GMURRU5 GM g![[4a SnGNFf=f![[4a SnGNHf=f)NTF) common_dirs common_files common_funnyrXrrRjoinr:r;rOSError ValueErrorr'r(appendS_ISDIRS_ISREG) r@xa_pathb_pathoka_statb_stata_typeb_types rphase2 dircmp.phase2siAWW\\$))Q/FWW\\$**a0FB    V^^4V^^4#%%,,Q/\\&))$$++A.\\&))%%,,Q/%%,,Q/!!((+=Z(   Z(  s$=GGGGG32G3c[URURURUR5nUuUlUlUlgr&)rr:r;r_r! same_files diff_files funny_files)r@xxs rphase3 dircmp.phase3s7 diiT->-> M=?:$*:rc Z0UlURHn[RR UR U5n[RR UR U5nURX#URURURS9URU'M g)Nr8) subdirsr^rrRrar:r; __class__r?r>r!)r@rga_xb_xs rphase4 dircmp.phase4s|  !!A'',,tyy!,C'',,tzz1-C#~~c TYY6:ll . DDLLO"rcUR5 URR5HnUR5 M gr&)r}ryvaluesphase4_closurer@sds rrdircmp.phase4_closures. ,,%%'B    (rc[SURUR5 UR(a<URR 5 [SURSUR5 UR (a<UR R 5 [SURSUR 5 UR (a0UR R 5 [SUR 5 UR(a0URR 5 [SUR5 UR(a0URR 5 [SUR5 UR(a0URR 5 [SUR5 UR(a1URR 5 [SUR5 gg) NdiffzOnly in:zIdentical files :zDiffering files :zTrouble with common files :zCommon subdirectories :zCommon funny cases :) printr:r;rYrJrZrrrsrtr^r`rKs rreport dircmp.reportsE fdii, >> NN   ! )TYYT^^ < ?? OO " )TZZdoo > ?? OO " %t 7 ?? OO " %t 7       ! ! # /1A1A B       ! ! # +T-=-= >       " " $ ($*;*; < rcUR5 URR5Hn[5 UR5 M gr&)rryrrrs rreport_partial_closuredircmp.report_partial_closures0 ,,%%'B G IIK(rcUR5 URR5Hn[5 UR 5 M gr&)rryrrreport_full_closurers rrdircmp.report_full_closures3 ,,%%'B G  " " $(r) ryrrrsrtr^r_r`rXrYrZrHrIcvXR;a [U5eURU"U5 [X5$r&) methodmapAttributeErrorgetattr)r@attrs r __getattr__dircmp.__getattr__s3 ~~ % & & tT"t""r)rXr^r_r`rsrtr>r?r:rHrYr;rIrZrrr!ry)NN)__name__ __module__ __qualname____firstlineno____doc__rCrLr[rorvr}rrrrrOrr classmethodr__class_getitem____static_attributes__rrrrrXs$ L  S#,J@ D =2 % V &6v!'f6"f%& :I # $L1rrc///4nUH_n[RRX5n[RRX5nU[XgU5R U5 Ma U$)a=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. )rrRra_cmprd)rArBrXr!resrgaxbxs rrr s^ r2,C  WW\\!  WW\\!  D !"))!, JrcXU"U"XU55(+$![[4a gf=f)N)rbrc)rArBshabsrs rrr$s2s1}%%% Z s ))c@[[URU55$r&)rTrrW)flistskips rrFrF-s  D--u5 66rc SSKnSSKnURURSSS5up#[U5S:waUR SS5e[ USUS5nSU;aUR 5 gUR5 g)Nrrrrzneed exactly two args)z-r)sysgetoptargvr GetoptErrorrrr)rroptionsargsdds rdemor3stMM#((12,4MG 4yA~  !8$?? Qa !BW   r__main__)T)rrr itertoolsrtypesr__all__rr.r rrrrrrrrrFrrrrrrs  ! I  J&P n2n2b67  zFr