+
    i  c                   s	   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt ^ RItARt ^ RI	t	A	Rt
 ^ RItARt ^ RIHt ARt] P                   R8H  tR;tt] P                   R8X  d   ^ RItM]'       d   ^ RIt]P(                  R8X  d   ^ RItMRt]'       d   RqMRrt]! ] R4      ;'       d    ]P(                  P1                  Rs4      s]! ] R	4      t];'       d
    ]! ]R
4      tRt. RtOt ! R R]4      t ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]#4      t$ ! R R]#4      t%R t&R t'R t(R t)]3R lt*RuR lt+R t,R t-R  t.R!R/R" lt/R!R/R# lt0]! ] R$4      '       d	   R!R/R% lt1MR& t1R!R/R' lt2R!R/R( lt3R!R/R) lt4R* t5RvR+ lt6RR]4RR3R, lt7]! ] Pp                  R-4      '       d   R. t9MR/ t9R0 t:R1 t;R2 t<] Pz                  ] P                  ] P|                  ] P~                  0] P                  8*  ;'       d;    ] P                  ] P                  9   ;'       d    ] P                  ] P                  9   tD]D'       d   ];M]:tERwR3RR4R/R5 lltF]D]FnG        R6 tH]43R7 ltIR8 tJR9 tKR: tLR; tMRxR< ltNRyR= ltOR]NnP        R]OnP        R>]NRz.R?3/tQ]'       d   ]NR{.R@3]QRA&   ]O. RB3]QRC&   ]
'       d
   ]NR|.RD3]QRE&   ]'       d
   ]NR}.RF3]QRG&   ]'       d
   ]NR~.RH3]QRI&   RJ tRRRK ltSRL tTRRM ltURN tVRO tWRRP ltXRQ tYRR tZRS t[RTR/RU lt\R>RV.]\. R?3RCRW.][. RB3/t]]'       d   RXRY.]\. R@3]]RA&   ]
'       d   RZR[.]\. RD3]]RE&   ]'       d   R\R].]\. RF3]]RG&   ]'       d   R^R_.]\. RH3]]RI&   R` t^RRTR/Ra llt_]! ] Rb4      '       d\   ]P                  Rc4       ]P                  ! RdRe4      tbRf]bP                  nd        Rg]bP                  nd        Rh]bP                  nd        Ri tgM/]'       d(   ]P                  Rc4       ]P                  ! RdRe4      tbRj tgRR4RR!R/Rk llthRRl ltiRm tjRn tk] P                  ] P                  ,          R3Ro ltnRp toR#   ] d    Rt EL,i ; i  ] d    Rt
 EL4i ; i  ] d    Rt EL<i ; i  ] d    Rt ELBi ; i)    NTF)zstdntposixwin32sendfilecopy_file_range
_fcopyfilez%.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSCErrorSpecialFileErrorSameFileErrorc                   s    ] tR t^KtRtR# )r    N__name__Z
__module__Z__qualname__Z__firstlineno__Z__static_attributes__r       /usr/lib64/python3.14/shutil.pyr   r   K       r   c                   s    ] tR t^NtRtR# )r
   r   Nr   r   r   r   r
   r
   N   r   r   c                   s    ] tR t^QtRtR# )r	   r   Nr   r   r   r   r	   r	   Q   r   r   c                   s    ] tR t^VtRtR# )	ReadErrorr   Nr   r   r   r   r   r   V   r   r   r   c                   s    ] tR t^YtRtR# )RegistryErrorr   Nr   r   r   r   r   r   Y   r   r   r   c                   s    ] tR t^]tRtR# )_GiveupOnFastCopyr   Nr   r   r   r   r   r   ]   r   r   r   c                 s    V P                  4       pVP                  4       p \        P                  ! Y4T4       R #   \         d   p\        T4      hR p?ii ; i  \
         de   pT P                  Tn        TP                  Tn        TP                  \        P                  \        P                  09   d   \        T4      hTR hR p?ii ; iN)fileno	Exceptionr   r   r   OSErrornamefilename	filename2errnoEINVALENOTSUP)fsrcfdstflagsinfdoutfderr   &&&   r   _fastcopy_fcopyfiler%   b   s    %{{} e,	  %$$%
   yy		99u}}55#C((4 s-    < A AAAC	%ACC	c                 s     \        \        P                  ! V 4      P                  R4      p\
        P                  R8  d   \        VR4      pV#   \         d    Rp L2i ; i)   i   i   l        i   @)Zmaxosfstatst_sizer   sysZmaxsizemin)r!   	blocksize   & r   #_determine_linux_fastcopy_blocksizer.   v   sW    ..8	
 {{W	7+	  	s   *A AAc                 sB    V P                  4       pVP                  4       p\        T4      p^ p  \        P
                  ! Y#YVR7      pT^ 8X  d   T^ 8X  d   \        4       hR # Yg,          pK>    \         d   p\        T4      hR p?ii ; i  \         d   pT P                  Tn        TP                  Tn	        TP                  \        P                  8X  d   TR hT^ 8X  d7   \        P                  ! T^ \        P                  4      ^ 8X  d   \        T4      hThR p?ii ; i)N)Z
offset_dst)r   r   r   r.   r'   r   r   r   r   r   r   ENOSPClseekSEEK_CUR)r   r   r!   r"   r#   r,   offsetZn_copied   &&      r   _fastcopy_copy_file_ranger4      s    %{{} 4D9IF
	))$yTH 1} Q;+--F;  %$$%  	99CL IICMyyELL(t# {rxxq"++>!C',,I	s/    A- B -B8BBDBDDc                 sv    V P                  4       pVP                  4       p\        T4      p^ p  \        P
                  ! Y2Ye4      pT^ 8X  d   R # Yg,          pK,    \         d   p\        T4      hR p?ii ; i  \         d   pT P                  Tn        TP                  Tn	        TP                  \        P                  8X  d   Rs\        T4      hTP                  \        P                  8X  d   TR hT^ 8X  d7   \        P                  ! T^ \        P                  4      ^ 8X  d   \        T4      hThR p?ii ; i)NF)r   r   r   r.   r'   r   r   r   r   r   r   ZENOTSOCK_USE_CP_SENDFILEr/   r0   r1   )r   r   r!   r"   r#   r,   r2   Zsentr3   r   _fastcopy_sendfiler6      s	   %{{} 4D9IF
	;;uF>D, qyNF?  %$$%  	99CL IICMyyENN* $) ',,yyELL(t# {rxxq"++>!C',,I'	s/    A A9 A6&A11A69D8B/D33D8c           	      sP   V P                   pVP                  p\        \        V4      4      ;_uu_ 4       p V! V4      pV'       g   M/Wb8  d    VRV ;_uu_ 4       pV! V4       RRR4       M
V! V4       KA  RRR4       R#   + '       g   i     L%; i  + '       g   i     R# ; i)TN)ZreadintowriteZ
memoryviewZ	bytearray)r   r   lengthZfsrc_readinto
fdst_writeZmvZnZsmv   &&&     r   _copyfileobj_readintor;      s     MMMJ	If%	&	&"b!AVVssO 2 
'	& V 
'	&	&s)   BB	B	$BBBB%	c                 s    V'       g   \         pV P                  pVP                  pV! V4      ;p'       d   V! V4       K  R # r   )COPY_BUFSIZEZreadr7   )r   r   r8   Z	fsrc_readr9   Zbufr$   r   copyfileobjr=      s8    		IJ6"
"#
"3 #r   c                 s   \        V \        P                  4      '       dd   \        \        P                  R 4      '       dD    \        P                  P                  V P                  4       \        P                  ! V4      4      # \        \        P                  R4      '       d!    \        P                  P                  W4      # \        P                  P                  \        P                  P                  V 4      4      \        P                  P                  \        P                  P                  V4      4      8H  #   \         d     R# i ; i  \         d     R# i ; i)samestatFsamefile)
isinstancer'   DirEntryhasattrpathr>   statr   r?   normcaseabspathsrcdst   &&r   	_samefilerK     s    #r{{##(D(D	77##CHHJ== rww
##	77##C--
 GGRWW__S12GGRWW__S123 4  		  		s%   AD= %E =EEEEc                 s    \        V \        P                  4      '       d   V P                  4       # \        P                  ! V 4      # r   )r@   r'   rA   rD   fn   &r   _statrO     s+    "2r{{332779DDr   c                 s    \        V \        P                  4      '       d   V P                  4       # \        P                  P                  V 4      # r   )r@   r'   rA   
is_symlinkrC   islinkrL   rN   r   _islinkrR     s0    (R[[992==?Qrww~~b?QQr   follow_symlinksc                sN   \         P                  ! R W4       \        W4      '       d   \        RP	                  W4      4      h^ p\        W.4       F  w  rE \        V4      p\        P                  ! VP                  4      '       dA   \        V\        P                  4      '       d   VP                  MTp\        RV,          4      h\        '       d   V^ 8X  d   VP                   pK  K  K  	  V'       g?   \%        V 4      '       d.   \        P&                  ! \        P(                  ! V 4      V4       V# \+        V R4      ;_uu_ 4       p \+        VR4      ;_uu_ 4       p\,        '       d2    \/        Wx\0        P2                  4       VuuRRR4       uuRRR4       # \6        '       g   \8        '       d^   \8        '       d#    \;        Wx4       VuuRRR4       uuRRR4       # \6        '       d#    \=        Wx4       VuuRRR4       uuRRR4       # MC\        '       d8   V^ 8  d1   \?        Wx\A        V\B        4      4       VuuRRR4       uuRRR4       # \E        Wx4       RRR4       RRR4       T#   \"         d     EK0  i ; i  \4         d     L=i ; i  \4         d     Li ; i  \4         d     L_i ; i  + '       g   i     L`; i  \F         d;   p	\        P                  PI                  T4      '       g   \K        RT 24      T	hh Rp	?	ii ; i  + '       g   i     T# ; i)zshutil.copyfilez{!r} and {!r} are the same filez`%s` is a named pipeZrbwbNzDirectory does not exist: )&r*   auditrK   r
   formatZ	enumeraterO   rD   ZS_ISFIFOst_moder@   r'   rA   rC   r	   _WINDOWSr)   r   rR   symlinkreadlinkopen_HAS_FCOPYFILEr%   r   Z_COPYFILE_DATAr   r5   _USE_CP_COPY_FILE_RANGEr4   r6   r;   r+   r<   r=   ZIsADirectoryErrorexistsFileNotFoundError)
rH   rI   rS   Z	file_sizeZirM   str   r   es
   &&$       r   copyfilerb     s}    II*=DDSNOOIC:&	'rB }}RZZ(( *2r{{ ; ;RWW&'='BCCxAFJJ	 #x ' ws||


2;;s#S)T JQ #t__%#t__%~!/E<P<PQ#& %_ _ *)-D-D22% 9$ E'* %_ _& ,+% 24 >'*) %_ _& , "i!m-d#i:VW"7 %_ _>  +; % P Jm  		,  1 ! ! $5 % $% $5 % $%+ %_@ % ww~~c**+.H,NOUVV	E _P Js   I2	LKJ8	-J
KJ8	)J8	5J8	J
K#J8	0J'<
KJ8	"J8	 
KJ8	 K2JJJJ8	JJ8	J$!J8	#J$$J8	'J52J8	4J55J8	8KKLKL5LLLL$	c                s&   \         P                  ! R W4       V'       go   \        V 4      '       d^   \        P                  P                  V4      '       d9   \        \        R4      '       d!   \        P                  \        P                  rCMVR# \        p\        P                  R8X  d*   \        P                  P                  V4      '       d   R pM\        P                  pV! V 4      pV! V\        P                  ! VP                  4      4       R# )zshutil.copymodelchmodNr   c                  s2    \         P                  ! V R R/  R# )rS   TN)r'   chmodargs   *r   
chmod_funcZcopymode.<locals>.chmod_funcu  s    $55r   )r*   rU   rR   r'   rC   rQ   rB   lstatrc   rO   r   rd   rD   S_IMODErW   )rH   rI   rS   Z	stat_funcrh   r`   s   &&$   r   copymoderk   c  s     II*ws||s0C0C2x  $&HHbiiz	77d?rww~~c226 J	3BsDLL,-r   	listxattrc                sH    \         P                  ! WR 7      pT F4  p \         P                  ! YTR 7      p\         P                  ! YYbR 7       K6  	  R#   \         dK   pTP                  \        P                  \        P
                  \        P                  39  d   h  Rp?R# Rp?ii ; i  \         dj   pTP                  \        P                  \        P                  \        P
                  \        P                  \        P                  39  d   h  Rp?EK  Rp?ii ; i)rS   N)r'   rl   r   r   r   ZENODATAr   ZgetxattrZsetxattrZEPERMZEACCES)rH   rI   rS   namesra   r   Zvalue   &&$    r   
_copyxattrrp   ~  s    	LLFE
 DCOCuN 	  	wwu}}emmU\\JJ	  775;;u}}#(<<#? ??s/   A 0B-B* ?B%%B*-D!8ADD!c                      R # r   r   )rf   kwargss   *,r   rp   rp         r   c                sv  a	 \         P                  ! R W4       RRRR/R lo	T;'       g8    \        V 4      ;'       d     \        P                  P                  V4      '       * pV'       d   V	3R lpMV	3R lp\        V \        P                  4      '       d   V P                  VR7      pMV! R4      ! WR7      p\        P                  ! VP                  4      pV! R	4      ! WP                  VP                  3VR
7       \        WVR7        V! R4      ! WVR7       \        VR4      '       d    V! R4      ! WP                   VR7       R# R#   \         d     L>i ; i  \"         dN   pR FA  p\        \$        T4      '       g   K  TP$                  \'        \$        T4      8X  g   K<    Rp?R# 	  h Rp?ii ; i)zshutil.copystatnsNrS   c                 rq   r   r   )rt   rS   rf   s   $$*r   _nopZcopystat.<locals>._nop  rs   r   c                 s&   < \        \        V S4      # r   )getattrr'   )r   ru      &r   lookupcopystat.<locals>.lookup  s    2tT**r   c                 sX   < \        \        V S4      pV\        P                  9   d   V# S# r   )rv   r'   supports_follow_symlinks)r   rM   ru      & r   rx   ry     s)    T4(BR000	Kr   rm   rD   Zutime)rt   rS   rd   st_flagsZchflags)Z
EOPNOTSUPPr   )r*   rU   rR   r'   rC   rQ   r@   rA   rD   rj   rW   Zst_atime_nsZst_mtime_nsrp   NotImplementedErrorrB   r|   r   r   rv   )
rH   rI   rS   Zfollowrx   r`   modewhyr#   ru   s
   &&$      @r   copystatr     sc    II*t T  JJWS\%I%IbggnnS6I JF	+
	 #r{{##XXfX-F^C8<<

#D
7OC^^R^^<  s0w6: r:	9c;;G    	  	.5#&&399s8K+K / 	s<   E 1E  EE F8+F3F3)F30F33F8c                s    \         P                  P                  V4      '       d>   \         P                  P                  V\         P                  P	                  V 4      4      p\        WVR 7       \        WVR 7       V# )rm   )r'   rC   isdirjoinbasenamerb   rk   )rH   rI   rS   s   &&$r   copyr     sS     
ww}}Sggll3 0 0 56S7S7Jr   c                s   \         P                  P                  V4      '       d>   \         P                  P                  V\         P                  P	                  V 4      4      p\        \        R 4      '       dv   \         P                  ! V 4      p\         P                  ! V4      p\        P                  pV'       g   V\        P                  ,          p \        P                  ! W4V4       V# \        WVR7       \!        WVR7       V#   \         dW   pTP                  \        P                  8X  d   T'       g    Rp?LSTP                  \        P                  8X  d    Rp?Lwh Rp?ii ; i)	CopyFile2Nrm   )r'   rC   r   r   r   rB   _winapifsdecodeZ%COPY_FILE_ALLOW_DECRYPTED_DESTINATIONZCOPY_FILE_COPY_SYMLINKr   r   winerrorZERROR_PRIVILEGE_NOT_HELDZERROR_ACCESS_DENIEDrb   r   )rH   rI   rS   Zsrc_Zdst_r    excro   r   copy2r     s     
ww}}Sggll3 0 0 56w$${{3{{3==W333E	d%0J S7S7J  	 @ @@' !<!<< 	s$   D
 
E+&E&E&%E&&E+c                  s   a  V 3R  lpV# )c                 sz   < . pS F(  pVP                  \        P                  ! W4      4       K*  	  \        V4      # r   )extendfnmatchfilterset)rC   rn   ignored_namesZpatternpatternss   &&  r   _ignore_patternsZ)ignore_patterns.<locals>._ignore_patterns  s4    G  !?@  =!!r   r   )r   r   s   j r   ignore_patternsr     s    
"
 r   c           
      s
   Ve8   T! \         P                  ! V4      V  Uu. uF  qP                  NK  	  up4      p	MRp	\         P                  ! W'R7       . p
V\        J ;'       g	    V\
        J pV  EF  pVP                  V	9   d   K  \         P                  P                  WP                  4      p\         P                  P                  W,P                  4      pV'       d   TMTp VP                  4       pV'       dI   \         P                  R8X  d4   VP                  RR7      pVP                  \        P                  8X  d   RpV'       d   \         P                  ! V4      pV'       d-   \         P                  ! VV4       \        WV'       * R7       EK(  \         P                  P                  V4      '       g   V'       d   EKX  VP!                  4       '       d   \#        WW4WVV4       EK  V! W4       EK  VP!                  4       '       d   \#        WW4VWg4       EK  V! W4       EK  	   \        W4       V
'       d   \%        V
4      hV# u upi   \$         d/   pT
P'                  TP(                  ^ ,          4        R p?EK  R p?i\*         d)   pT
P-                  Y\/        T4      34        R p?EKI  R p?ii ; i  \*         d6   p\1        TRR 4      f   T
P-                  Y\/        T4      34        R p?LR p?ii ; i)N)Zexist_okr   Frm   r   r   )r'   fspathr   makedirsr   r   rC   r   rP   rD   st_reparse_tagIO_REPARSE_TAG_MOUNT_POINTrZ   rY   r   r^   is_dircopytreer   r   rf   r   appendstrrv   )entriesrH   rI   symlinksignorecopy_functionignore_dangling_symlinksdirs_exist_okZxr   ZerrorsZuse_srcentryZsrcentryZsrcnameZdstnameZsrcobjrP   ri   linktor#   r   s   &&&&&&&&             r   	_copytreer   !  s>   ryy~/H1/HIKK,F E)BB]d-BL==M)'',,sMM2'',,sMM2)w&	8!,,.Jbggo !e<''4+J+JJ!&JW- JJvw/V(lKK 77>>&116N (( (!.!.0 &f6""(M1B f.M Z0
 FmJ{ 0Ib  	'MM#((1+&& 	8MM7SX677	8  03
D)1MM3SX./0s   I
'I?AII-)I$I>I	II0I;II"I0K J? "J		J?J?J::J?L+K==Lc                 s    \         P                  ! R W4       \        P                  ! V 4      ;_uu_ 4       p\	        V4      pRRR4       \        XWVW4VVR7      #   + '       g   i     L!; i)zshutil.copytreeN)r   rH   rI   r   r   r   r   r   )r*   rU   r'   scandirlistr   )	rH   rI   r   r   r   r   r   Zitrr   s	   &&&&&&&  r   r   r   c  sU    P II*	CCs) 
W#".F#02 2 
s   AA+	st_file_attributesc                 s    \         P                  ! V P                  4      ;'       gG    V P                  \         P                  ,          ;'       d    V P
                  \         P                  8H  # r   )rD   S_ISLNKrW   r   ZFILE_ATTRIBUTE_REPARSE_POINTr   r   r`   rN   r   _rmtree_islinkr     sX    RZZ( J J""T%F%FF I I%%)H)HH	Kr   c                 sB    \         P                  ! V P                  4      # r   )rD   r   rW   r   rN   r   r   r     s    ||BJJ''r   c                 sx  a Ve   \        R4      h \        P                  ! V 4      p \	        T4      '       d   \        R4      h T3R lp\        P                  ! T RT\        P                  R7      pT F  w  rxp	T F9  p
\        P
                  P                  Yz4      p \        P                  ! T4       K;  	  T	 F9  p
\        P
                  P                  Yz4      p \        P                  ! T4       K;  	  K  	   \        P                  ! T 4       R #   \         d#   pS! \        P                  Y4        R p?R # R p?ii ; i  \         d-   pS! \        P
                  P                  Y4        R p?R # R p?ii ; i  \         d     EK  \         d$   pS! \        P                  Y4        R p?EK:  R p?ii ; i  \         d     EK  \         d$   pS! \        P                  Y4        R p?EK:  R p?ii ; i  \         d     R # \         d#   pS! \        P                  Y4        R p?R # R p?ii ; i)Nz#dir_fd unavailable on this platform%Cannot call rmtree on a symbolic linkc                 s|   < \        V \        4      '       g%   S! \        P                  V P                  V 4       R # R # r   )r@   r_   r'   r   r   )r#   onexcrw   r   onerrorZ_rmtree_unsafe.<locals>.onerror  s*    #011"**cllC0 2r   F)Ztopdownr   Zfollowlinks)r}   r'   ri   r   r   rC   rQ   walkZ_walk_symlinks_as_filesr   rmdirr_   unlink)rC   dir_fdr   r`   r#   r   Zresultsdirpathdirnames	filenamesr   fullnames   &&f         r   _rmtree_unsafer     s   !"GHHXXd^"ABB 1 ggdE7HbHbcG(/$9Dww||G2H/"  Dww||G2H0		(#  )0"#
C  bhh"  bggnnd( %  /bhh../ %  0bii//0   #bhh""#s   D E !F G ?G? E"D??EE>!E99E>F=F=F=F88F= G<G<G<G77G<?H9H9H9H44H9c                 s   \        V \        4      '       d   \        P                  ! V 4      p \        P                  WR 3.p V'       d   \        W24       K   V'       dC   VP                  4       w  rErV\        P                  Jd   K1   \        P                  ! V4       KJ  R #   \         d#   pT! \        P                  Y4        R p?Kt  R p?ii ; i  T'       ds   TP                  4       w  rErT\        P                  Jd   K1   \        P                  ! T4       KJ    \         d#   pT! \        P                  Y4        R p?Kr  R p?ii ; ii ; ir   )	r@   bytesr'   r   ri   _rmtree_safe_fd_steppopcloser   )rC   r   r   stackfuncZfdentryr#   r:   r   _rmtree_safe_fdr     s    ${{4 hhd+,E+ .  $)IIK!Dd288#+   +bhh**+ $)IIK!Dd288#+ +bhh**+ sZ   C 
C 
B$ $C/CCE)EDEE*EEEEc                 s   V P                  4       w  r#rEVf   TMVP                  p V\        P                  J d   \        P                  ! V4       R # V\        P                  J d   \        P                  ! WcR7       R # Vf   \        P
                  ! WcR7      pMVP                  RR7      p\        P                  p\        P                  ! V\        P                  \        P                  ,          VR7      p\        P                  P                  p \        P                  P                  V\        P                  ! V4      4      '       g   \        R4      hV P                  \        P                  W4V34       V P                  \        P                  WV34       \        P                   p\        P                   ! V4      ;_uu_ 4       p	\#        V	4      p
R R R 4       X
 F  p\        P                  P%                  WKP                  4      p VP'                  RR7      '       d%   V P                  \        P
                  WV34       Ki    \        P*                  ! TP                  TR7       K  	  R #   T P                  \        P                  YT34       i ; i  + '       g   i     L; i  \(         d     K  \         d     L}i ; i  \(         d     K  \         d$   pT! \        P*                  Y4        R p?EK!  R p?ii ; i  \(         d9   pTe   T\        P                  J d   YMn        T! Y$T4        R p?R #  R p?R # R p?i\         d   pYMn        T! Y$T4        R p?R # R p?ii ; i)N)r   Frm   r   )r   r   r'   r   r   ri   rD   r[   ZO_RDONLYZ
O_NONBLOCKrC   rQ   r>   r(   r   r   r   r   r   r   r_   r   r   )r   r   r   ZdirfdrC   Z
orig_entryr   Zorig_stZtopfdZ
scandir_itr   r   r   r#   s   &&            r   r   r     so    %*IIK!D%4:??D6288HHUO288HHT(
 hht2G ooeo<GwwbkkBMM9%Hww~~	>77##GRXXe_==EFFLL"((E<=LL"((E<=zzZZ*:&G Eww||D**5H<<<66LL"((EU!CD 70		%**U3  LL"((E<=  %   %  0bii//0 #!1L$c"" "2  d#s   *L +L  BL 9I5 -I5 <AL J6L :J/	L "K/L 5$JL J,	'L /K
:L =K
K
L 	K

L LL L$L%L<L LL M1'M		M1M1M,,M1r   r   c                s   a \         P                  ! R W4       V'       d   R pMSf	   Vf   R pMVf   Sf   R pMV3R lp\        WV4       R# )zshutil.rmtreec                  rq   r   r   re   rg   r   r   rmtree.<locals>.onexcA  s    r   Nc                      h r   r   re   rg   r   r   r   D  s    r   c                  r   r   r   re   rg   r   r   r   H  s    r   c                  s\   < V w  rpVf   RpM\        V4      W3P                  3pS! WV4      # )N)NNN)ZtypeZ__traceback__)rf   r   rC   r   Zexc_infor   s   *    r   r   r   L  s7    "&C;/H#Cy#/@/@@Ht844r   )r*   rU   _rmtree_impl)rC   Zignore_errorsr   r   r   s   &&f$$r   rmtreer   *  sI    * IIot,		U]		?5 u%r   c                 s   \         P                  ! V 4      p \         P                  P                  \         P                  P                  ;'       g    R ,           p\         P                  P                  V P                  V4      4      # ) )r'   r   rC   sepZaltsepr   rstrip)rC   r   r-   r   	_basenamer   Z  sQ     99T?D
''++--2
.C77DKK,--r   c                 s   \         P                  ! R W4       Tp\        P                  P	                  V4      '       d   \        W4      '       d>   \        P                  P                  V 4      '       g   \        P                  ! W4       R# \        P                  P                  V\        V 4      4      p\        P                  P                  V4      '       d   \        RV,          4      h \        P                  ! W4       V#   \         Edt    \        P                  P                  T 4      '       dF   \        P                  ! T 4      p\        P                  ! YC4       \        P                  ! T 4        T# \        P                  P	                  T 4      '       d   \!        Y4      '       d   \        RT : RT: R24      h\#        T 4      '       g]   \        P$                  ! T \        P&                  4      '       gF   \        P(                  ! T 4      '       d*   \         P*                  R8X  d   \-        RT : RT : R24      h\/        YTR	R
7       \1        T 4        T# T! Y4       \        P                  ! T 4        T# i ; i)zshutil.moveNz$Destination path '%s' already existszCannot move a directory 'z' into itself 'z'.Zdarwinz%Cannot move the non-empty directory 'z ': Lacking write permission to 'T)r   r   )r*   rU   r'   rC   r   rK   rQ   Zrenamer   r   r^   r   r   rZ   rY   r   
_destinsrc_is_immutableaccessZW_OKZlistdirplatformZPermissionErrorr   r   )rH   rI   r   Zreal_dstr   s   &&&  r   mover   l  s   4 IImS&H	ww}}SSrww~~c':': IIc 77<<Ys^477>>(##>IJJ
		# , O+  77>>#[[%FJJv(IIcN" O! WW]]3###(+S2 3 3c""IIc27733

3LLH4%),c'3 4 4 S-"$3K O #(IIcNO+s9   .D 0J7AJ<$J!A JJAJ#JJc                 s   \         P                  P                  V 4      p \         P                  P                  V4      pV P                  \         P                  P                  4      '       g"   V \         P                  P                  ,          p VP                  \         P                  P                  4      '       g"   V\         P                  P                  ,          pVP                  V 4      # r   )r'   rC   rF   endswithr   
startswithrG   rJ   r   r   r     s    
''//#
C
''//#
C<<$$rww{{<<$$rww{{>>#r   c                 s    \        V 4      p\        P                  \        P                  .p\	        VR 4      ;'       d    VP
                  V9   # )r|   )rO   rD   ZUF_IMMUTABLEZSF_IMMUTABLErB   r|   )rH   r`   Zimmutable_states   &  r   r   r     sA    	sB))4+<+<=2z"FFr{{6F'FFr   c                     V f   R #  ^ RI Hp  T! T 4      pTe
   T^,          # R #   \         d     R # i ; i  \         d    R p L0i ; i)N)getgrnam)Zgrpr   ImportErrorKeyError)r   r   resultr   r   _get_gidr     ^    | $ ay  
     & 8 55AAc                 r   )N)getpwnam)Zpwdr   r   r   )r   r   r   r   r   _get_uidr     r   r   c	                 s  aaaa Vf   Rp	Mr\         '       d   VR8X  d   Rp	M\\        '       d   VR8X  d   Rp	MF\        '       d   VR8X  d   Rp	M0\        '       d   VR8X  d   Rp	M\	        RP                  V4      4      h^ R Ip
V'       d
   R	V	,           MRpV R
,           V,           p\        P                  P                  V4      pV'       dZ   \        P                  P                  V4      '       g5   Ve   VP                  RV4       V'       g   \        P                  ! V4       Ve   VP                  R4       \        S4      o\        S4      oVVVV3R lpV'       gd   V
P                  VRV	,          4      pTpVe    \        P                  P!                  W4      p VP#                  VVVR7       VP%                  4        Ve    \        P                  P'                  V4      pV#   TP%                  4        i ; i)Nr   gzipZgzbzip2bz2xzzstzCbad value for 'compress', or compression format not supported : {0}..tarcreating %szCreating tar archivec                 sP   < Se   SV n         SV n        Se   SV n        SV n        V # r   )gidZgnameuidZuname)Ztarinfor   groupownerr   s   &r   _set_uid_gidZ#_make_tarball.<locals>._set_uid_gid  s.    ?GK!GM?GK!GMr   zw|%sr   )_ZLIB_SUPPORTED_BZ2_SUPPORTED_LZMA_SUPPORTED_ZSTD_SUPPORTED
ValueErrorrV   tarfiler'   rC   dirnamer^   infor   r   r   r[   r   addr   rF   )	base_namebase_dircompressverbosedry_runr   r   loggerroot_dirZtar_compressionr   Zcompress_extZarchive_namearchive_dirr   tararcnamer   r   s   &&&&&ff&&        @@r   _make_tarballr     s     	X/	H/	X-	X. ++16(+;= 	= ,43("Lv%4L''//,/K277>>+66KK{3KK$ *+
5/C
5/C  ll</)ABww||H7H	GGHglG;IIKww|4	 IIKs    G) )G;c                 s   ^ RI pV R,           p	\        P                  P                  V 4      p
V
'       dZ   \        P                  P	                  V
4      '       g5   Ve   VP                  RV
4       V'       g   \        P                  ! V
4       Ve   VP                  RW4       V'       Egi   VP                  V	RVP                  R7      ;_uu_ 4       p\        P                  P                  V4      pVe    \        P                  P                  Wq4      p\        P                  P                  V4      pV\        P                  8w  d(   VP                  W4       Ve   VP                  RV4       \        P                  ! V4       EF  w  rpTpVe!   \        P                  P                  VV4      p\        P                  P                  V4      p\        V4       Fm  p\        P                  P                  VV4      p\        P                  P                  VV4      pVP                  VV4       Vf   K[  VP                  RV4       Ko  	  V F  p\        P                  P                  VV4      p\        P                  P                  V4      p\        P                  P!                  V4      '       g   Ki  \        P                  P                  VV4      pVP                  VV4       Vf   K  VP                  RV4       K  	  EK  	  RRR4       Ve    \        P                  P#                  V	4      p	V	#   + '       g   i     L5; i)r    N.zipr   z#creating '%s' and adding '%s' to itZw)compressionzadding '%s')zipfiler'   rC   r   r^   r   r   ZipFileZZIP_DEFLATEDZnormpathr   curdirr7   r   ZrelpathZsortedZisfilerF   )r   r   r   r   r   r   r   r   r   Zzip_filenamer   Zzfr   r   r   r   Z
arcdirpathr   rC   s   &&&&&&&&           r   _make_zipfiler   (  s_    v%L''//),K277>>+66KK{3KK$9 	, 7__\3)0)=)=  ? ?BDgg&&x0G#77<<;ww''1H"))#+%KKx8020A,9$
'!#X!FJWW--j9
"8,D77<<6D ggll:t<GHHT7+)M48 - &D77<<6D77++D1Dww~~d++"$'',,z4"@w/!-"KKt< & 1B?< ww|4A? ?s    E!L:9A<L::3L:2L::M
	r   zuncompressed tar filezgzip'ed tar-fileZgztarzZIP filezipzbzip2'ed tar-fileZbztarzxz'ed tar-fileZxztarzzstd'ed tar-fileZzstdtarc                  s    \         P                  4        U Uu. uF  w  rW^,          3NK  	  pp pVP                  4        V# u upp i )r&   )_ARCHIVE_FORMATSitemssort)r   Zregistryformats      r   get_archive_formatsr  ~  sI      %%')' (6tqk"'  )LLNN)s   Ac                 s<   Vf   . p\        V4      '       g   \        RV,          4      h\        V\        \        34      '       g   \        R4      hV F:  p\        V\        \        34      '       d   \        V4      ^8w  g   K1  \        R4      h	  WV3\        V &   R # )NzThe %s object is not callablez!extra_args needs to be a sequencez+extra_args elements are : (arg_name, value))callable	TypeErrorr@   Ztupler   Zlenr   )r   function
extra_argsdescriptionZelements   &&&& r   register_archive_formatr    s     
H7(BCCj5$-00;<<'E4=11S\A5EIJJ  'K@Tr   c                     \         V  R # r   )r   r   rN   r   unregister_archive_formatr    s
    r   c	                 s   \         P                  ! R WW#4        \        V,          p	RTRTRTRT/p
T	^ ,          pT	^,           F	  w  rYT&   K  	  Tf   \
        P                  p\        TRR4      pRpTe   \
        P                  ! T4      P                  p\        P                  ! T4      '       g   \        \        P                  R	T4      hT'       d   \
        P                  ! T 4      p Y*R
&   Mh\
        P                  ! 4       pTe   TP!                  RT4       \
        P"                  P%                  T 4      p T'       g   \
        P&                  ! T4        T! Y3/ T
B pTe-   Te   TP!                  RT4       \
        P&                  ! T4       T#   \         d    \	        RT,          4      Rhi ; i  Te.   Te   TP!                  RT4       \
        P&                  ! T4       i i ; i)zshutil.make_archivezunknown archive format '%s'Nr   r   r   r   supports_root_dirFzNot a directoryr   zchanging into '%s'zchanging back to '%s')r*   rU   r   r   r   r'   r   rv   rD   rW   ZS_ISDIRZNotADirectoryErrorr   ZENOTDIRr   getcwdZdebugrC   rF   Zchdir)r   rV   r   r   r   r   r   r   r   format_inforr   r   ZargZvalr  Zsave_cwdZstmdr   s   &&&&&&&&&         r   make_archiver    s   $ II#YKK&v. (Fugu.F q>DNNs # 99&95AHwwx ((||D!!$U]]4ExPP		),I!):yy{H!18<	2I"	6v6!4h?HHXOQ  K6?@dJKF !4h?HHX  s   F 	F7 F473G*c                  s    \         P                  4        U Uu. uF  w  rW^ ,          V^,          3NK  	  pp pVP                  4        V# u upp i r    )_UNPACK_FORMATSr  r  )r   r   r  r  r   get_unpack_formatsr    sO     $$&(& -7D1gtAw'&  (LLNN(s   A
c                 s    / p\         P                  4        F  w  rEV^ ,           F  pWCV&   K	  	  K  	  V  F$  pWs9   g   K  Rp\        WW7,          3,          4      h	  \        V4      '       g   \	        R4      hR# )r    z!%s is already registered for "%s"z*The registered function must be a callableN)r  r  r   r  r  )	
extensionsr  r	  Zexisting_extensionsr   r   ext	extensionZmsgs	   &&&      r   _check_unpack_optionsr    s     %++-
77C'+$  .  	+5C':'E'G !G H H   HDEE r   c                 s@    Vf   . p\        WV4       WW43\        V &   R # r   )r  r  )r   r  r  r	  r
  s   &&&&&r   register_unpack_formatr    s(    " 
*
;&*IODr   c                 r  r   )r  r  rN   r   unregister_unpack_formatr    s
    r   c                 s    \         P                  P                  V 4      p\         P                  P                  V4      '       g   \         P                  ! V4       R # R # r   )r'   rC   r   r   r   )rC   r   r-   r   _ensure_directoryr    s8    ggood#G77==!!
G "r   c           
      s   ^ RI pVP                  V 4      '       g   \        RV ,          4      hVP                  V 4      p VP	                  4        F  pVP
                  pVP                  R4      '       g   RV9   d   K/  \        P                  P                  ! V.VP                  R4      O5!  pV'       g   Kj  \        V4       VP                  R4      '       d   K  VP                  VR4      ;_uu_ 4       p\        VR4      ;_uu_ 4       p\        Wx4       RRR4       RRR4       K  	  VP                  4        R#   + '       g   i     L.; i  + '       g   i     EK  ; i  TP                  4        i ; i)r    Nz%s is not a zip fileZ/z..ZrrT   )r   Z
is_zipfiler   r   Zinfolistr   r   r'   rC   r   splitr  r   r[   r=   r   )	r   extract_dirr   r   r   r   Z
targetpathZsourceZtargets	   &&       r   _unpack_zipfiler    s    h''.9::
//(
#CLLND==D s##tt|kDDJJsODJj)==%%XXdC((FZ..&/ / )( #$ 			 /. )(( 			sI    A7E' 8!E' E' 8ED?E!E' ?E
EE$
E' 'E9r   c                s    ^ RI p VP                  V 4      p TP	                  YR7       TP                  4        R#   TP                   d    \        RT ,          4      hi ; i  TP                  4        i ; i)r    Nz/%s is not a compressed or uncompressed tar filer   )r   r[   ZTarErrorr   Z
extractallr   )r   r  r   r   Ztarobjs   &&$  r   _unpack_tarfiler   ;  sv     Jh'+5  J=HJ 	JJ 	s   < A# $A #A5r   r   z.tar.gzz.tgzz.tar.bz2z.tbz2z.tar.xzz.txzz.tar.zstz.tzstc                 s    \         P                  4        F2  w  rV^ ,           F   pV P                  V4      '       g   K  Vu u # 	  K4  	  R# )r    N)r  r  r   )r   r   r   r     &   r   _find_unpack_formatr"  c  sB    %++-
aI  ++ ! . r   c                sn   \         P                  ! R WV4       Vf   \        P                  ! 4       p\        P                  ! V4      p\        P                  ! V 4      p Vf   / pMRV/pVe5    \
        V,          pT^,          pT! Y3/ \        T^,          4      BTB  R# \        V 4      pVf   \        RP                  V 4      4      h\
        V,          ^,          p\        \
        V,          ^,          4      V,          pV! W3/ VB  R#   \         d    \        RP                  T4      4      Rhi ; i)zshutil.unpack_archiveNr   zUnknown unpack format '{0}'zUnknown archive format '{0}')r*   rU   r'   r  r   r  r   r   rV   Zdictr"  r   )r   r  rV   r   Zfilter_kwargsr  r   rr   s   &&&$    r   unpack_archiver#  j  s   $ II%xfEiik))K(Kyy"H~!6*	U)&1K 1~XLd;q>&:LmL %X.>:AA(KLLv&q)of-a01MAX-f-  	U:AA&IJPTT	Us   .D 'D4statvfs
disk_usageZusageztotal used freezTotal space in byteszUsed space in byteszFree space in bytesc                 s   \         P                  ! V 4      pVP                  VP                  ,          pVP                  VP                  ,          pVP                  VP
                  ,
          VP                  ,          p\        W4V4      # r   )r'   r$  Zf_bavailZf_frsizeZf_blocksZf_bfree_ntuple_diskusage)rC   r`   freetotaluseds   &    r   r%  r%    s^     ZZ{{R[[(bkk)bjj(BKK7 d33r   c                 sZ    \         P                  ! V 4      w  rW,
          p\        WV4      # r   )r   Z_getdiskusager&  )rC   r(  r'  r)  r!  r   r%  r%    s*     &&t,| d33r   c                s   \         P                  ! R WV4       Vf   Vf   \        R4      hTpTpVf   RpM?\        V\        4      '       d*   \        V4      pVf   \        RP                  V4      4      hVf   RpM?\        V\        4      '       g*   \        V4      pVf   \        RP                  V4      4      h\        P                  ! WWcVR7       R# )zshutil.chownNzuser and/or group must be setzno such user: {!r}zno such group: {!r})r   rS   i)r*   rU   r   r@   r   r   ZLookupErrorrV   intr   r'   chown)rC   Zuserr   r   rS   Z_userZ_groups   &&&$$  r   r+  r+    s     IInd%0|899EF |	D#		=299$?@@}s##%>3::5ABBHHT&,.r   c                 s    \        \        P                  R ,          4      p \        \        P                  R,          4      pV^ 8:  g   V^ 8:  d|    \        P
                  ! \        P                  P                  4       4      pV^ 8:  d   VP                  ;'       g
    V ^ ,          pV^ 8:  d   VP                  ;'       g
    V ^,          p\        P                  ! W34      #   \        \        3 d    ^ p Li ; i  \        \        3 d    ^ p Li ; i  \        \        \        3 d    \        P                  ! T 4      p Li ; i)ZCOLUMNSZLINES)r*  r'   environr   r   get_terminal_sizer*   Z
__stdout__r   AttributeErrorr   Zterminal_sizecolumnslines)Zfallbackr/  r0  Zsizer!  r   r-  r-    s   (bjj+,BJJw'(
 !|uz	.''(=(=(?@D
 a<ll11hqkGA:JJ--(1+EW,--+ j! 
 j!  
G4 	. ##H-D	.s4    C#  C< 2D #C98C9<DD,EEc                 s    \         P                  P                  V 4      ;'       dC    \         P                  ! W4      ;'       d%    \         P                  P	                  V 4      '       * # r   )r'   rC   r^   r   r   )rM   r~   rJ   r   _access_checkr1    sI    GGNN2 & &299R#6 & &GGMM"%%'r   c                 s    V\         P                  ,          '       * ;'       g+    \        P                  ! \         P                  ! V 4      4      # r   )r'   X_OKr   ZNeedCurrentDirectoryForExePathr   )cmdr~   rJ   r   _win_path_needs_curdirr4    s:       " "W%K%KC &" "r   c                 s  a \        V \        4      p\        P                  P	                  V 4      w  r@V'       d   V.pEM6Vf<   \        P
                  P                  RR 4      pVf    \        P                  ! R4      pV'       g   R # V'       dK   \        P                  ! V4      pVP	                  \        P                  ! \        P                  4      4      pM5\        P                  ! V4      pVP	                  \        P                  4      p\        P                  R8X  dR   \!        W4      '       dA   \        P"                  pV'       d   \        P                  ! V4      pVP%                  ^ V4       \        P                  R8X  Ed1   \        P&                  ! R4      ;'       g    \(        pVP	                  \        P                  4      pV Uu. uF  q'       g   K  VP+                  R4      NK  	  ppV'       d&   V Uu. uF  p\        P                  ! V4      NK  	  ppV Uu. uF  qV,           NK  	  p	pV P-                  4       oV\        P.                  ,          '       dA   \0        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d   V	P%                  ^ V 4       MV .p	\3        4       p
V Fz  p\        P                  P5                  V4      pW9  g   K*  V
P7                  V4       V	 F9  p\        P                  P9                  W4      p\;        W4      '       g   K5  Vu u # 	  K|  	  R #   \        \        3 d    \        P                  p ELi ; iu upi u upi u upi )	NZPATHZCS_PATHr   ZPATHEXTr   c              3   sb   <"   T F$  pSP                  VP                  4       4      x  K&  	  R # 5ir   )r   upper)Z.0r  normcmdr{   r   Z	<genexpr>Zwhich.<locals>.<genexpr>g  s'     &XPWw'7'7		'D'DPWs   ,/TF)r@   r   r'   rC   r  r,  ZgetZconfstrr.  r   ZdefpathZfsencodeZpathsepr   r*   r   r4  r   ZinsertZgetenv_WIN_DEFAULT_PATHEXTr   r5  r2  Zanyr   rE   r   r   r1  )r3  r~   rC   Z	use_bytesr   r   Zpathext_sourceZpathextr  ZfilesZseenZdirZnormdirZthefiler   r6  s   &&&            @r   whichr8  '  sl    3&I
 77==%LGy<::>>&$/D|&::i0D ;;t$D::bkk"**56D;;t$D::bjj)D<<7"'=c'H'HYYFV,KK6"
||w9-EE1E &&rzz2.5=gs?3::c?g=3:;7Cr{{3'7G;&-.gssg. ))+rww33&XPW&X333&XPW&X#X#XLLC  5D''""3'HHW ww||C1 ,,K !	  q '
3 &::D&8 > <.s*   )M 	M3!M3M8)M=!M0/M0c                 s    V R 8X  d,   ^ RI pVP                  RVP                   R2RR7       \        # \	        R\
        : RV : 24      h)Z	ExecErrorNzshutil.ExecErrorz); it isn't raised by any shutil function.)Zremovezmodule z has no attribute )i   i   )warningsZ_deprecatedZ_DEPRECATED_MSGZRuntimeErrorr.  r   )r   r9  r-   r   __getattr__r:  y  s]    {''( )3 3	 	 	
 
78,.@I
JJr   i   i   )ZlinuxZandroidZsunos)r=   rb   rk   r   r   r   r   r   r   r   r	   r  r  r  r  r  r  r  r#  r   r+  r8  r-  r
   r  )F)FN)r   r    r    NNNN)r    r    NNNN)r   N)r   r   )r   r   )r   r   )r   r   )Nr   )NNr    r    NNN)NN))iP   i   )pr'   r*   rD   r   Zcollectionsr   Zzlibr   r   r   r   Zlzmar   r   r   r   r   rX   r   r   r   r   r<   rB   r   r5   r]   r\   r7  Z__all__r   r   r
   r	   r   r   r   r   r%   r.   r4   r6   r;   r=   rK   rO   rR   rb   rk   rp   r   r   r   r   r   r   Zstat_resultr   r   r   r   r[   r   r   Zsupports_dir_fdr   Zsupports_fdrz   Z_use_fd_functionsr   r   Zavoids_symlink_attacksr   r   r   r   r   r   r   r   r  r   r  r  r  r  r  r  r  r  r  r  r   r  r"  r#  r   Z
namedtupler&  r(  Z__doc__r)  r'  r%  r+  r-  r1  r4  ZF_OKr2  r8  r:  r   r   r   <module>r;     s   
 
    ONO O 77d? 77g<<7G&{J B
+ O O//0MN !"&78 7775,7 ? 	G 	@E @;w ;
0 0&I &	 
 (&'R1f .: (4$ERF$ FP.$ .4 2{ 0@$ @Dd $&t &P
@D !&d%&+5.2` 2>>/00K
(*#Z+&EN ggrww		288<''( < <ZZ2>>1< < WW ; ;;  #4*&T *&$ *&\ !2 .$ "' @DG
$$FP7r #' "&  
m01%' 
 !.1E0F 2!4W,b*=U!.1F0G 3!5W !.1C0D 0!2W #03F2G"4#6YA*=@	F$J,<T ( 
vh-DE	vhZ8
 !*F 3_b 2 4OG !+W 5 3 5OG !*F 3_b 0 2OG #-w"7""4"6OI..d ..b 2yNN< #..w8IJ&<#%:"%:"
4 NN< #..w8IJ4&. &.t &.P+.b'
" GGbgg%D Pd
KO3  O  N  O  OsD   Q Q Q! 	Q1 	QQ	QQ!	Q.-Q.1	Q>=Q>