+
     Bi%                       R t RtRt^ RIHt ^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt ^ RIt ^ RIt]]]3t. RcOtRtRt]^,          tRtRt^dt^dt^tRtRt Rt!Rt"Rt#Rt$Rt%Rt&Rt'R t(R!t)R"t*R#t+R$t,R%t-^ t.^t/^t0]0t1]] ]!]"]%]&]']#]$](])]*3t2]] ]']*3t3](])]*3t4Rdt50 Remt6R*]7R+]7R']7R(]8R)]8R&]8/t9]Pt                  R,8X  d   R-t;M]Px                  ! 4       t;R. t=R/ t>R0 t?^]13R1 lt@R2 tAR]R3R3 ltBR4 tC ! R5 R]D4      tE ! R6 R]E4      tF ! R7 R]E4      tG ! R8 R	]E4      tH ! R9 R
]E4      tI ! R: R]E4      tJ ! R; R<]J4      tK ! R= R>]J4      tL ! R? R@]J4      tM ! RA RB]J4      tN ! RC RD]J4      tO ! RE RF4      tP ! RG RH4      tQ ! RI RJ]R4      tS ! RK RL]R4      tT ! RM RN]P                  4      tV ! RO R]E4      tW ! RP R]W4      tX ! RQ R]W4      tY ! RR R]W4      tZ ! RS R]W4      t[ ! RT R]W4      t\ ! RU R]W4      t]]W]]F3t^RfRV lt_RW t`RX taRY tbRZ]`R[]aR\]b/tc]R! 4       td]P                  ! R]4      tf ! R^ R]R4      tg ! R_ R]R4      thR` ti]hP                  tRa tj]kRb8X  d
   ]j! 4        R# R#   ] d    Rt EL:i ; i  ] d    Rt ELEi ; i)gz0.9.0u"   Lars Gustäbel (lars@gustaebel.de)u4   Gustavo Niemeyer, Niels Gustäbel, Richard Townsend.)openNTarFileTarInfoTarError	ReadErrorCompressionErrorStreamErrorExtractErrorHeaderErrorFilterErrorAbsoluteLinkErrorOutsideDestinationErrorSpecialFileErrorAbsolutePathErrorLinkOutsideDestinationErrorLinkFallbackError    i   s   ustar   s   ustar 00   0   1   2   3   4   5   6   7   L   K   S   x   g   Xsizemtimeuidgidatimectimentutf-8c                     V f   \        R4      hV P                  W#4      p V R V V\        V 4      ,
          \        ,          ,           # )Nzmetadata cannot contain None)
ValueErrorencodelenNUL)slengthencodingerrorss   &&&&/usr/lib/python3.14/tarfile.pystnr3      sA     	y788	"AWf:#a&C///    c                 ^    V P                  R 4      pVR8w  d   V RV p V P                  W4      # )r   N)finddecode)r.   r0   r1   ps   &&& r2   ntsr:      s2     	
uABwbqE88H%%r4   c                    V ^ ,          R9   du   ^ p\        \        V 4      ^,
          4       F"  pV^,          pWV^,           ,          ,          pK$  	  V ^ ,          ^8X  d"   R\        V 4      ^,
          ,          V,
          ) pV#  \        V RR4      p \        V P	                  4       ;'       g    R^4      pV#   \
         d    \        R4      hi ; i)       asciistrict0invalid header)      )ranger,   r:   intstripr*   InvalidHeaderError)r.   nis   &  r2   ntirJ      s    
 	t~s1vz"A!GA1q5MA # Q45=#a&1*%)*A H	7Aw)AAGGI$$a(A H  	7$%566	7s   (B7 -B7 7Cc                    T p\        V 4      p ^ T u;8:  d   ^V^,
          ,          8  d-   M M)\        RV^,
          V 3,          R4      \        ,           pV# V\        8X  d   RV^,
          ,          ) T u;8:  d   RV^,
          ,          8  dq   M MmV ^ 8  d   \	        ^.4      pM\	        ^.4      pRV,          V ,           p \        V^,
          4       F%  pVP                  ^V ^,          4       V ^,          p K'  	  V# \        R4      h)r<   z%0*or>   r=   zoverflow in number field)rE   bytesr-   
GNU_FORMAT	bytearrayrD   insertr*   )rH   digitsformat
original_nr.   rI   s   &&&   r2   itnrS      s     JAAA!fqj!!&FQJ?*G4s: H 
:	36A:#6"6!"Qcfqj>Q"Q65'"A5'"Av!Avz"AHHQE	"!GA # H 344r4   c                     R \        \        P                  ! RV 4      4      ,           pR \        \        P                  ! RV 4      4      ,           pW3# )r=   
148B8x356B
148b8x356b)sumstructunpack_from)bufunsigned_chksumsigned_chksums   &  r2   calc_chksumsr]      sE     C 2 2< EFFO#f00sCDDM))r4   c                    T;'       g    RpV^ 8X  d   R# Vf   \         P                  ! WV4       R# \        W$4      w  rV\        V4       F=  pV P	                  V4      p\        V4      V8  d	   V! R4      hVP                  V4       K?  	  V^ 8w  d;   V P	                  V4      p\        V4      V8  d	   V! R4      hVP                  V4       R# )   Nunexpected end of datai @  )shutilcopyfileobjdivmodrD   readr,   write)	srcdstr/   	exceptionbufsizeblocks	remainderbrZ   s	   &&&&&    r2   rb   rb      s     ""G{~3W-v/F6]hhws8g455		#	  A~hhy!s8i455		#
r4   c                     \        \        P                  R R4      pVe"   V P                  VR4      P	                  V4      p \        V RR7       R# )r0   Nbackslashreplace )end)getattrsysstdoutr+   r8   print)r.   r0   s   & r2   _safe_printru     s@    szz:t4HHHX1299(C	!r4   c                       ] tR tRtRtR# )r   i   N__name__
__module____qualname____firstlineno____static_attributes__rw   r4   r2   r   r         r4   c                       ] tR tRtRtR# )r	   i  rw   Nrx   rw   r4   r2   r	   r	     r~   r4   c                       ] tR tRtRtR# )r   i  rw   Nrx   rw   r4   r2   r   r     r~   r4   c                       ] tR tRtRtR# )r   i  rw   Nrx   rw   r4   r2   r   r     r~   r4   c                       ] tR tRtRtR# )r   i  rw   Nrx   rw   r4   r2   r   r     r~   r4   c                       ] tR tRtRtR# )r
   i  rw   Nrx   rw   r4   r2   r
   r
     r~   r4   c                       ] tR tRtRtR# )EmptyHeaderErrori  rw   Nrx   rw   r4   r2   r   r     r~   r4   r   c                       ] tR tRtRtR# )TruncatedHeaderErrori!  rw   Nrx   rw   r4   r2   r   r   !  r~   r4   r   c                       ] tR tRtRtR# )EOFHeaderErrori$  rw   Nrx   rw   r4   r2   r   r   $  r~   r4   r   c                       ] tR tRtRtR# )rG   i'  rw   Nrx   rw   r4   r2   rG   rG   '  r~   r4   rG   c                       ] tR tRtRtR# )SubsequentHeaderErrori*  rw   Nrx   rw   r4   r2   r   r   *  r~   r4   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )_LowLevelFilei1  c                >   R \         P                  R\         P                  \         P                  ,          \         P                  ,          /V,          p\        \         R4      '       d   V\         P                  ,          p\         P                  ! WR4      V n        R# )rwO_BINARYi  N)	osO_RDONLYO_WRONLYO_CREATO_TRUNChasattrr   r   fd)selfnamemodes   &&&r2   __init___LowLevelFile.__init__7  sf    rzz)BJJ6
  2z""BKKD''$e,r4   c                F    \         P                  ! V P                  4       R # N)r   closer   r   s   &r2   r   _LowLevelFile.close@  s    
r4   c                D    \         P                  ! V P                  V4      # r   )r   rd   r   r   r!   s   &&r2   rd   _LowLevelFile.readC  s    wwtww%%r4   c                H    \         P                  ! V P                  V4       R # r   )r   re   r   r   r.   s   &&r2   re   _LowLevelFile.writeF  s    
!r4   )r   N)
ry   rz   r{   r|   r   r   rd   re   r}   __classdictcell____classdict__s   @r2   r   r   1  s     -& r4   r   c                   l   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tRR
 ltR tR tR tRtV tR# )_StreamiI  c                \   R V n         Vf   \        W4      pRV n         VR8X  d   \        V4      pVP                  4       pT;'       g    RV n        W n        W0n        W@n        WPn        RV n	        ^ V n
        RV n         VR8X  d_    ^ RIpYn        TP                  R4      T n        TR8X  d$   TP"                  T n        T P'                  4        R# T P)                  T4       R# VR	8X  dN    ^ RIp	TR8X  d*   RT n        T	P/                  4       T n        \2        T n        R# T	P5                  T4      T n        R# VR8X  dU    ^ RIp
TR8X  d0   RT n        T
P9                  4       T n        T
P:                  T n        R# T
P=                  TR7      T n        R# VR8X  dU    ^ RIH p TR8X  d0   RT n        TPC                  4       T n        TPD                  T n        R# TPG                  4       T n        R# VR8w  d   \        RV,          4      hR#   \         d    \        R4      Rhi ; i  \         d    \        R
4      Rhi ; i  \         d    \        R4      Rhi ; i  \         d    \        R4      Rhi ; i   T P                   '       g   T P                  PI                  4        R T n        h ; i)TNF* r4   gzzzlib module is not availabler   bz2bz2 module is not availablexzlzma module is not availablepresetzst)zstd(compression.zstd module is not availabletarunknown compression type %r)%_extfileobjr   _StreamProxygetcomptyper   r   comptypefileobjri   rZ   posclosedzlibImportErrorr   crc32crcerrorrh   _init_read_gz_init_write_gzr   dbufBZ2DecompressorcmpOSErrorBZ2CompressorlzmaLZMADecompressor	LZMAErrorLZMACompressorcompressionr   ZstdDecompressor	ZstdErrorZstdCompressorr   )r   r   r   r   r   ri   compresslevelr   r   r   r   r   s   &&&&&&&&    r2   r   _Stream.__init__U  s     ?#D/G$Ds? #7+G**,H

		 7	4U !	::c?3;%)ZZDN&&(''6U"T 3; #DI"224DH%,DN"00?DHT!U 3; #DI#446DH%)^^DN#22&2ADHU"a0 3; #DI#446DH%)^^DN#224DHU"&'Dx'OPP #Y # U*+IJPTTU # T*+HItST # U*+IJPTTU # a*+UV\``a	###""$DKs   ?I5 H	 AI5 I5 $I5 ,H$ 0.I5  I5 8I5  H? 4I5 :I5 I5 I !4I5 I5 .I5 	H!!I5 $H<<I5 ?II5 I22I5 56J+c                v    \        V R 4      '       d'   V P                  '       g   V P                  4        R# R# R# )r   N)r   r   r   r   s   &r2   __del___Stream.__del__  s(    4""4;;;JJL ,7"r4   c                   V P                   P                  VV P                   P                  V P                   P                  ) V P                   P                  ^ 4      V n        \        P                  ! R\        \        P                  ! 4       4      4      pV P                  RV,           R,           4       V P                  P                  R4      '       d   V P                  RR V n        \        P                  P                  V P                  4      V n        V P                  V P                  P!                  RR4      \"        ,           4       R# )	r<   <Ls   s   .gzNz
iso-8859-1replace)r   compressobjDEFLATED	MAX_WBITSDEF_MEM_LEVELr   rX   packrE   time_Stream__writer   endswithr   pathbasenamer+   r-   )r   r   	timestamps   && r2   r   _Stream._init_write_gz  s     99(()-););*.))*=*=)=)-)@)@)*	,
 KKc$))+&67	(94{BC99e$$		#2DIGG$$TYY/	TYY%%lI>DEr4   c                :   V P                   R 8X  d+   V P                  P                  WP                  4      V n        V ;P                  \        V4      ,          un        V P                   R8w  d   V P                  P                  V4      pV P                  V4       R# )r   r   N)	r   r   r   r   r   r,   r   compressr   r   s   &&r2   re   _Stream.write  se     ==D yyq((3DHCF==E!!!!$AQr4   c                $   V ;P                   V,          un         \        V P                   4      V P                  8  dS   V P                  P	                  V P                   R V P                   4       V P                   V P                  R  V n         Kv  R # r   )rZ   r,   ri   r   re   r   s   &&r2   __write_Stream.__write  sa     	A$((mdll*LLtxx67xx.DH +r4   c                Z   V P                   '       d   R # RV n          V P                  R8X  dC   V P                  R8w  d2   V ;P                  V P                  P                  4       ,          un        V P                  R8X  d   V P                  '       d   V P                  P                  V P                  4       RV n        V P                  R8X  d|   V P                  P                  \        P                  ! RV P                  4      4       V P                  P                  \        P                  ! RV P                  R,          4      4       V P                  '       g   V P                  P                  4        R # R #   T P                  '       g   T P                  P                  4        i i ; i)NTr   r   r4   r   r   l    )r   r   r   rZ   r   flushr   re   rX   r   r   r   r   r   r   s   &r2   r   _Stream.close  s    ;;;	%yyCDMMU$:DHHNN,,yyCDHHH""488,==D(LL&&v{{4'BCLL&&v{{4J9N'OP###""$ $4###""$ $s   A5E; B8E; ;/F*c                8   V P                   P                  V P                   P                  ) 4      V n        R V n        V P                  ^4      R8w  d   \        R4      hV P                  ^4      R8w  d   \        R4      h\        V P                  ^4      4      pV P                  ^4       V^,          '       dR   \        V P                  ^4      4      R\        V P                  ^4      4      ,          ,           pV P                  V4       V^,          '       d)    V P                  ^4      pV'       d   V\        8X  g   K'   V^,          '       d)    V P                  ^4      pV'       d   V\        8X  g   K'   V^,          '       d   V P                  ^4       R# R# )r4   s   not a gzip file   zunsupported compression methodr=   N)r   decompressobjr   r   r   _Stream__readr   r   ordrd   r-   )r   flagxlenr.   s   &   r2   r   _Stream._init_read_gz  s%    99**DII,?,?+?@	 ;;q>[(-..;;q>W$"#CDD4;;q>"A!88t{{1~&s4;;q>/B)BBDIIdO!88KKNAH"99KKNAH!88KKN r4   c                    V P                   # r   )r   r   s   &r2   tell_Stream.tell  s     xxr4   c                *   WP                   ,
          ^ 8  ds   \        WP                   ,
          V P                  4      w  r#\        V4       F  pV P	                  V P                  4       K   	  V P	                  V4       V P                   # \        R4      h)r<   z seeking backwards is not allowed)r   rc   ri   rD   rd   r   )r   r   rj   rk   rI   s   &&   r2   seek_Stream.seek  sn     >Q &sXX~t|| DF6]		$,,' #IIi  xx @AAr4   c                l    V P                  V4      pV ;P                  \        V4      ,          un        V# r   )_readr   r,   )r   r!   rZ   s   && r2   rd   _Stream.read  s)     jjCH
r4   c                H   V P                   R 8X  d   V P                  V4      # \        V P                  4      pV P                  .pW!8  d   V P                  '       d   V P                  pRV n        M.V P
                  P                  V P                  4      pV'       g   MA V P                  P                  V4      pTP                  T4       T\        T4      ,          pK  RP                  V4      pW1R V n        VRV #   T P                   d   p\        R4      ThRp?ii ; i)r   r4   zinvalid compressed dataN)r   r   r,   r   rZ   r   rd   ri   r   
decompressrh   r   appendjoin)r   r!   ctrZ   es   &&    r2   r  _Stream._read  s     ==E!;;t$$		NYYKhxxxhhll''5Bhh))#. HHSMSMAHHQKeH	$x >> B 9:ABs    C? ?D!DD!c                6   \        V P                  4      pV P                  .pW!8  dT   V P                  P                  V P                  4      pV'       g   M%VP                  V4       V\        V4      ,          pKY  R P                  V4      pW1R V n        VRV # )r4   N)r,   rZ   r   rd   ri   r  r  )r   r!   r  r  rZ   s   &&   r2   __read_Stream.__read7  sz     MXXJh,,##DLL1CHHSMSMAHHQKU8$xr4   )r   rZ   ri   r   r   r   r   r   rh   r   r   r   r   r   Nr<   )ry   rz   r{   r|   r   r   r   re   r   r   r   r  r  rd   r  r   r}   r   r   s   @r2   r   r   I  sI     ObF"/%,>
6 r4   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )r   iH  c                Z    Wn         V P                   P                  \        4      V n        R # r   )r   rd   	BLOCKSIZErZ   )r   r   s   &&r2   r   _StreamProxy.__init__M  s    <<$$Y/r4   c                P    V P                   P                  V n        V P                  # r   )r   rd   rZ   r   s   &&r2   rd   _StreamProxy.readQ  s    LL%%	xxr4   c                <   V P                   P                  R 4      '       d   R# V P                   R,          R8X  d   V P                   R,          R8X  d   R# V P                   P                  R4      '       d   R# V P                   P                  R4      '       d   R	# R
# )s   r   :r<      Ns   BZh:   
   Ns   1AY&SYr   r   s   (/r   r   )s   ]  s   7zXZ)rZ   
startswithr   s   &r2   r   _StreamProxy.getcomptypeU  sq    88//XXc]f$$9)DXX  !CDDXX  !455r4   c                :    V P                   P                  4        R # r   )r   r   r   s   &r2   r   _StreamProxy.closea  s    r4   )rZ   r   rd   N)
ry   rz   r{   r|   r   rd   r   r   r}   r   r   s   @r2   r   r   H  s     
0
 r4   r   c                      a  ] tR tRt o RR ltR t]R 4       tR tR t	R t
R	 t]P                  3R
 ltRR ltR tR tRtV tR# )_FileInFileih  Nc                   Wn         W n        W0n        ^ V n        W@n        RV n        Vf   ^ V3.p^ V n        . V n        ^ pV P                  pV F^  w  r#W&8  d   V P                  P                  RWbR34       V P                  P                  RW"V,           V34       Ws,          pW#,           pK`  	  W`P                  8  d+   V P                  P                  RW`P                  R34       R# R# )r<   FNT)	r   offsetr!   positionr   r   	map_indexmapr  )r   r   r'  r!   r   	blockinfolastposrealposs   &&&&&&  r2   r   _FileInFile.__init__n  s    		TI ++%LF >?HHOOT6D='BCOGmG & YYHHOOUGYY=> r4   c                    R # r   rw   r   s   &r2   r   _FileInFile.flush  s    r4   c                    R # )rbrw   r   s   &r2   r   _FileInFile.mode  s    r4   c                    R # Trw   r   s   &r2   readable_FileInFile.readable  s    r4   c                    R # )Frw   r   s   &r2   writable_FileInFile.writable  s    r4   c                6    V P                   P                  4       # r   )r   seekabler   s   &r2   r<  _FileInFile.seekable  s    ||$$&&r4   c                    V P                   # r   )r(  r   s   &r2   r  _FileInFile.tell       }}r4   c                X   V\         P                  8X  d2   \        \        V^ 4      V P                  4      V n        V P
                  # V\         P                  8X  do   V^ 8  d/   \        V P
                  V,           ^ 4      V n        V P
                  # \        V P
                  V,           V P                  4      V n         V P
                  # V\         P                  8X  dC   \        \        V P                  V,           V P                  4      ^ 4      V n        V P
                  # \        R4      h)r<   zInvalid argument)	ioSEEK_SETminmaxr!   r(  SEEK_CURSEEK_ENDr*   )r   r(  whences   &&&r2   r  _FileInFile.seek  s     R[[ Ha 0$))<DM }} r{{"!| #DMMH$<a @ }} !$DMMH$<dii H
 }}	 r{{"DII$8$)) DaHDM }} /00r4   c                N   Vf   V P                   V P                  ,
          pM&\        WP                   V P                  ,
          4      pRpV^ 8  EdS    V P                  V P                  ,          w  r4rVW@P                  u;8:  d   V8  d   M MMHV ;P                  ^,          un        V P                  \        V P                  4      8X  g   K|  ^ V n        K  \        WV P                  ,
          4      pV'       dr   V P                  P                  W`P                  V,
          ,           4       V P                  P                  V4      p\        V4      V8w  d   \        R4      hW(,          pMV\        V,          ,          pW,          pV ;P                  V,          un        EKZ  V# )Nr4   r`   )r!   r(  rD  r*  r)  r,   r   r  rd   r   r-   )	r   r!   rZ   datastartstopr'  r/   rl   s	   &&       r2   rd   _FileInFile.read  s$    <99t}},DtYY67DQh,0HHT^^,D)TMM0D0NNa'N~~TXX6)*dmm34F!!&MME,A"BCLL%%f-q6V##$<==sV|#NDMMV#MM
r4   c                f    V P                  \        V4      4      pW!R \        V4      % \        V4      # r   )rd   r,   )r   rl   rZ   s   && r2   readinto_FileInFile.readinto  s*    iiA)3s83xr4   c                    R V n         R# )TN)r   r   s   &r2   r   _FileInFile.close  s	    r4   )r   r   r*  r)  r   r'  r(  r!   r   )ry   rz   r{   r|   r   r   propertyr   r6  r9  r<  r  rB  rC  r  rd   rP  r   r}   r   r   s   @r2   r%  r%  h  sY     ?2  '
 %'KK  >
 r4   r%  c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )ExFileObjecti  c                   < \        VP                  VP                  VP                  VP                  VP
                  4      p\        SV `  V4       R # r   )r%  r   offset_datar!   r   sparsesuperr   )r   tarfiletarinfor   	__class__s   &&& r2   r   ExFileObject.__init__  s;    goow/B/BgllGNN<!r4   rw   ry   rz   r{   r|   r   r}   r   __classcell__r]  r   s   @@r2   rV  rV    s     " "r4   rV  c                       ] tR tRtRtR# )r   i  rw   Nrx   rw   r4   r2   r   r     s    r4   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )r   i  c                P   < Wn         \        SV `	  R VP                  : R24       R# )zmember z has an absolute pathNr\  rZ  r   r   r   r\  r]  s   &&r2   r   AbsolutePathError.__init__  s$    77<<"22GHIr4   r\  r_  ra  s   @@r2   r   r     s     J Jr4   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )r   i  c                p   < Wn         W n        \        SV `  VP                  : R V: R2R,           4       R# )z would be extracted to ,  which is outside the destinationNr\  _pathrZ  r   r   r   r\  r   r]  s   &&&r2   r    OutsideDestinationError.__init__  s7    
GLL++B4("M=> 	?r4   rn  r\  r_  ra  s   @@r2   r   r          ? ?r4   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )r   i  c                N   < Wn         \        SV `	  VP                  : R 24       R# )z is a special fileNre  rf  s   &&r2   r   SpecialFileError.__init__  s"    GLL++=>?r4   rh  r_  ra  s   @@r2   r   r     s     @ @r4   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )r   i  c                N   < Wn         \        SV `	  VP                  : R 24       R# )z is a link to an absolute pathNre  rf  s   &&r2   r   AbsoluteLinkError.__init__  s"    GLL++IJKr4   rh  r_  ra  s   @@r2   r   r     s     L Lr4   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )r   i  c                p   < Wn         W n        \        SV `  VP                  : R V: R2R,           4       R# )z would link to rk  rl  Nrm  ro  s   &&&r2   r   $LinkOutsideDestinationError.__init__  s6    
GLL+?4("E=> 	?r4   rq  r_  ra  s   @@r2   r   r     rr  r4   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )r   i  c                t   < Wn         W n        \        SV `  R VP                  : R2RV: R2,           4       R# )zlink z would be extracted as a zcopy of z, which was rejectedNrm  ro  s   &&&r2   r   LinkFallbackError.__init__  s?    
5 00IJ%dX-ABC 	Dr4   rq  r_  ra  s   @@r2   r   r     s     D Dr4   c                    / pV P                   p\        P                  P                  V\        P                  P                  R 7      pVP                  R\        P                  34      '       d5   V P                  P                  R\        P                  ,           4      ;qCR&   \        P                  P                  V4      '       d   \        V 4      h\        P                  P                  \        P                  P                  W4      \        P                  P                  R 7      p\        P                  P                  WQ.4      V8w  d   \        W4      hV P                  pVe   VR,          pV'       d   V P                  4       '       g   V P                  4       '       d#   V^@,          '       g
   VR,          pVR,          pM:V P!                  4       '       g   V P#                  4       '       d   RpM\%        V 4      hW`P                  8w  d   WcR&   V'       Ed   V P&                  e   RVR&   V P(                  e   RVR&   V P*                  e   RVR	&   V P,                  e   RVR
&   V P                  4       '       g   V P#                  4       '       Edj   \        P                  P                  V P.                  4      '       d   \1        V 4      h\        P                  P3                  V P.                  4      pWpP.                  8w  d   WsR&   V P#                  4       '       dJ   \        P                  P                  V\        P                  P5                  V4      V P.                  4      pM*\        P                  P                  VV P.                  4      p\        P                  P                  V\        P                  P                  R 7      p\        P                  P                  WQ.4      V8w  d   \7        W4      hV# )r?   /r   Ni    r   r#   r$   unamegnamelinknamei)r   r   r   realpathALLOW_MISSINGr   seplstripisabsr   r  
commonpathr   r   isregislnkisdirissymr   r#   r$   r  r  r  r   normpathdirnamer   )member	dest_pathfor_data	new_attrsr   target_pathr   
normalizeds   &&&     r2   _get_filtered_attrsr    s   I;;D  2773H3H II RVV}%%#);;#5#5cBFFl#CC 	ww}}T  ''''""277<<	#@*,''*?*? # AK	ww;23y@%f::;;De|||~~e||FND6<<>> 'v..;; $fx::!#Ie::!#Ie<<#!%Ig<<#!%Ig<<>>V\\^^ww}}V__--'//))&//:J__,(2*%||~~ ggll9+-77??4+@+1??< !ggll9+1??<''**;24''2G2G + IKww!!;":;yH1&FFr4   c                     V # r   rw   )r  r  s   &&r2   fully_trusted_filterr  Q  s    Mr4   c                 Z    \        WR 4      pV'       d   V P                  ! R/ VBRR /B # V # )Fdeeprw   r  r   r  r  r  s   && r2   
tar_filterr  T  s-    #Fu=I~~6	666Mr4   c                 Z    \        WR 4      pV'       d   V P                  ! R/ VBRR/B # V # )Tr  Frw   r  r  s   && r2   data_filterr  Z  s-    #Ft<I~~6	666Mr4   fully_trustedr   rK  s   ([0-9]{1,20}) c                     a  ] tR tRt o ]! RX/ RRbRRbRRbRR	bR
RbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbR R!bR"R#bR$R%bR&R%bR'R%b tRYR( lt]R) 4       t]P                  R* 4       t]R+ 4       t
]
P                  R, 4       t
]R- 4       t]P                  R. 4       tR/ tR]R]R]R]R]R]R]R]R0R1R2]/
R3 ltR4 t]]R53R6 ltR7 tR8 tR9 t]R: 4       tR; t]R< 4       t]R= 4       t]R> 4       t]R? 4       t]R@ 4       t]RA 4       tRB t RC t!RD t"RE t#RF t$RG t%RH t&RI t'RJ t(RK t)RL t*RM t+RN t,RO t-RP t.RQ t/RR t0RS t1RT t2RU t3RV t4RWt5V t6R%# )Zr   ip  r   zName of the archive member.r   zPermission bits.r#   z6User ID of the user who originally stored this member.r$   z7Group ID of the user who originally stored this member.r!   zSize in bytes.r"   zTime of last modification.chksumzHeader checksum.typezFile type. type is usually one of these constants: REGTYPE, AREGTYPE, LNKTYPE, SYMTYPE, DIRTYPE, FIFOTYPE, CONTTYPE, CHRTYPE, BLKTYPE, GNUTYPE_SPARSE.r  zcName of the target file name, which is only present in TarInfo objects of type LNKTYPE and SYMTYPE.r  z
User name.r  zGroup name.devmajorzDevice major number.devminorzDevice minor number.r'  zThe tar header starts here.rX  zThe file's data starts here.pax_headerszMA dictionary containing key-value pairs of an associated pax extended header.rY  zSparse member information._tarfileN_sparse_structs_link_targetc                    Wn         R V n        ^ V n        ^ V n        ^ V n        ^ V n        ^ V n        \        V n        RV n	        RV n
        RV n        ^ V n        ^ V n        ^ V n        ^ V n        RV n        / V n        R# )i  r   N)r   r   r#   r$   r!   r"   r  REGTYPEr  r  r  r  r  r  r'  rX  rY  r  r   r   s   &&r2   r   TarInfo.__init__  s{     			
	

r4   c                R    ^ RI pVP                  R\        ^R7       V P                  # r<   N)
stacklevelzhThe undocumented "tarfile" attribute of TarInfo objects is deprecated and will be removed in Python 3.16warningswarnDeprecationWarningr  )r   r  s   & r2   r[  TarInfo.tarfile  s-    A1 	 	. }}r4   c                J    ^ RI pVP                  R\        ^R7       Wn        R# r  r  )r   r[  r  s   && r2   r[  r    s(    A1 	 	.  r4   c                    V P                   # r   r   r   s   &r2   r   TarInfo.path  s     yyr4   c                    Wn         R # r   r  r  s   &&r2   r   r    s    	r4   c                    V P                   # r   r  r   s   &r2   linkpathTarInfo.linkpath  r@  r4   c                    Wn         R # r   r  )r   r  s   &&r2   r  r    s     r4   c                h    R V P                   P                  V P                  \        V 4      3,          # )z<%s %r at %#x>)r]  ry   r   idr   s   &r2   __repr__TarInfo.__repr__  s&    4>>#:#:499RX"NNNr4   r  T_KEEPc       
            V	'       d   \         P                  ! V 4      pM\         P                   ! V 4      pWJd   Wn        W*Jd   W+n        W:Jd   W;n        WJJd   WKn        WZJd   W[n        WjJd   Wkn        WzJd   W{n        WJd   Wn	        V# r   )
copydeepcopyr   r"   r   r  r#   r$   r  r  )r   r   r"   r   r  r#   r$   r  r  r  r  results   &$$$$$$$$$$ r2   r   TarInfo.replace  s     ]]4(FYYt_FK LK &OJJ L Lr4   c                    V P                   f   R pMV P                   R,          pRV P                  RVRV P                  RV P                  RV P                  RV P
                  RV P                  R	V P                  R
V P                  RV P                  RV P                  RV P                  RV P                  /pVR	,          \        8X  d4   VR,          P                  R4      '       g   VR;;,          R,          uu&   V# )N  r   r   r#   r$   r!   r"   r  r  r  r  r  r  r  r  )r   r   r#   r$   r!   r"   r  r  r  r  r  r  r  DIRTYPEr   )r   r   infos   &  r2   get_infoTarInfo.get_info  s     99D99v%D				

		




  <7"4<+@+@+E+ELCLr4   surrogateescapec                B   V P                  4       pVP                  4        F  w  rVVe   K  \        RV,          4      h	  V\        8X  d   V P	                  WBV4      # V\
        8X  d   V P                  WBV4      # V\        8X  d   V P                  WB4      # \        R4      h)Nz%s may not be Nonezinvalid format)	r  itemsr*   USTAR_FORMATcreate_ustar_headerrM   create_gnu_header
PAX_FORMATcreate_pax_header)r   rQ   r0   r1   r  r   values   &&&&   r2   tobufTarInfo.tobuf
  s     }}::<KD} !5!<== ( \!++DFCCz!))$&AAz!))$99-..r4   c                D   \         VR &   \        VR,          P                  W#4      4      \        8  d   \	        R4      h\        VR,          P                  W#4      4      \
        8  d#   V P                  VR,          W#4      w  VR&   VR&   V P                  V\        W#4      # )magicr  zlinkname is too longr   prefix)	POSIX_MAGICr,   r+   LENGTH_LINKr*   LENGTH_NAME_posix_split_name_create_headerr  )r   r  r0   r1   s   &&&&r2   r  TarInfo.create_ustar_header  s     $WtJ&&x89KG344tF|""845C+/+A+A$v,PX+a(DNDL""4xHHr4   c                   \         VR &   Rp\        VR,          P                  W#4      4      \        8  d%   W@P	                  VR,          \
        W#4      ,          p\        VR,          P                  W#4      4      \        8  d%   W@P	                  VR,          \        W#4      ,          pW@P                  V\        W#4      ,           # )r  r4   r  r   )
	GNU_MAGICr,   r+   r  _create_gnu_long_headerGNUTYPE_LONGLINKr  GNUTYPE_LONGNAMEr  rM   )r   r  r0   r1   rZ   s   &&&& r2   r  TarInfo.create_gnu_header(  s     "WtJ&&x89KG//Z0@BRT\eeCtF|""845C//V>NPXaaC((z8LLLr4   c                   \         VR &   V P                  P                  4       pRR\        3RR\        3RR3 FI  w  rEpWS9   d   K   W,          P                  RR4       \        Y,          4      T8  g   K?  Y,          Y5&   KK  	  R F  w  rGRpW,          p	\        V	\        4      p
V
'       d   \        V	4      MT	p^ Tu;8:  d   ^V^,
          ,          8  g
   M ^ W&   RpMV
'       d   WV&   RpV'       g   Kr  WC9  g   Kz  \        V	4      W4&   K  	  V'       d   V P                  V\        V4      pMR	pWP                  V\        RR
4      ,           #   \         d    Y,          Y5&    EK3  i ; i)r  r   r   r  r  r>   r?   FTr4   r   )r  r      )r  r  r  ))r#      )r$   r  )r!      )r"   r  )r  r  r  r  r  r+   UnicodeEncodeErrorr,   
isinstancefloatroundstr_create_pax_generic_headerXHDTYPEr  r  )r   r  r0   r  r   hnamer/   rP   	needs_paxvalval_is_floatval_intrZ   s   &&&          r2   r  TarInfo.create_pax_header6  sb   
 $W&&++-
 -
J/T&(>$@D #
!!'84
 4:'%)Z"!$@( RLDI*C%c51L$0eCjcG3!
"33
 	 %T
 	 yT4$'H!% R* 11+wQCC((|WiPPPG & %)Z"s   EE,+E,c                0    V P                  V\        R 4      # )r(   )r  XGLTYPE)clsr  s   &&r2   create_pax_global_header TarInfo.create_pax_global_headerp  s     --k7GLLr4   c                X   VP                  R 4      p\        ^\        V4      4       Fv  pR P                  VRV 4      pR P                  WER 4      p\        VP	                  W#4      4      \
        8:  g   KO  \        VP	                  W#4      4      \        8:  g   Kt   Wa3# 	  \        R4      h)r  Nzname is too long)splitrD   r,   r  r+   LENGTH_PREFIXr  r*   )r   r   r0   r1   
componentsrI   r  s   &&&&   r2   r  TarInfo._posix_split_namev  s     ZZ_
q#j/*AXXj!n-F88JrN+D6==23}DH56+E | + /00r4   c                   V P                  R 4      \        \        39   pV'       d<   \        V P                  R^ 4      ^V4      p\        V P                  R^ 4      ^V4      pM\	        R^W#4      p\	        R^W#4      pV P                  R \
        4      pVf   \        R4      h\	        V P                  RR4      ^dW#4      \        V P                  R^ 4      R,          ^V4      \        V P                  R	^ 4      ^V4      \        V P                  R
^ 4      ^V4      \        V P                  R^ 4      ^V4      \        V P                  R^ 4      ^V4      RV\	        V P                  RR4      ^dW#4      V P                  R\        4      \	        V P                  RR4      ^ W#4      \	        V P                  RR4      ^ W#4      VV\	        V P                  RR4      ^W#4      .p\        P                  ! R\        ,          RP                  V4      4      p	\        V	\        ) R 4      ^ ,          p
V	RR \        RV
,          R4      ,           V	RR ,           p	V	# )r  r  r  r   NzTarInfo.type must not be Noner   r   r  r#   r$   r!   r"   s           r  r  r  r  r  z%dsr4   z%06o r>   ii)getCHRTYPEBLKTYPErS   r3   r  r*   r  rX   r   r  r  r]   rL   )r  rQ   r0   r1   has_device_fieldsr  r  filetypepartsrZ   r  s   &&&&       r2   r  TarInfo._create_header  s   
 !HHV,'0BB488J2Av>H488J2Av>H2q(3H2q(3H 88FG,<== $c8<#f,a8"Av."Av.#R0!$b&1R(#x@HHWk*"%r8<"%r8<2&X>
$ kk%)+SXXe_=c9*+./2%4j5F!2G<<s45zI
r4   c                    \        \        V 4      \        4      w  rV^ 8  d    V \        V,
          \        ,          ,          p V # r  )rc   r,   r  r-   )payloadrj   rk   s   &  r2   _create_payloadTarInfo._create_payload  s7    
 #3w<;q=	I-44Gr4   c                    VP                  W44      \        ,           p/ pR VR&   W%R&   \        V4      VR&   \        VR&   V P	                  V\
        W44      V P                  V4      ,           # )z././@LongLinkr   r  r!   r  )r+   r-   r,   r  r  r  r  )r  r   r  r0   r1   r  s   &&&&& r2   r  TarInfo._create_gnu_long_header  sn    
 {{8,s2&VV4yV!W !!$hG##D)* 	*r4   c                   R pVP                  4        F  w  rV VP                  RR4       K  	  RpV'       d
   VR,          pVP                  4        F  w  rVVP                  R4      pV'       d   VP                  VR4      pMVP                  R4      p\        V4      \        V4      ,           ^,           p^ ;r V\        \	        V
4      4      ,           p	W8X  d   MT	p
K'  V\        \	        V
4      R4      R,           V,           R	,           V,           R
,           ,          pK  	  / pRVR&   W+R&   \        V4      VR&   \        VR&   V P                  V\        RR4      V P                  V4      ,           #   \         d	    Rp  EKV  i ; i)Fr(   r?   Tr4   s   21 hdrcharset=BINARY
r  r>          =   
z././@PaxHeaderr   r  r!   r  r   )
r  r+   r  r,   r  rL   r  r  r  r  )r  r  r  r0   binarykeywordr  recordslrH   r9   r  s   &&&&        r2   r  "TarInfo._create_pax_generic_header  sp    )//1NGWh/ 2 00G)//1NGnnW-G X/@AW-Gs5z)A-AIACFO6uSVW-4w>EMPUUUG! 2( 'VV7|V#W !!$gyI##G,- 	-I & s   E33FFc                V   \        V4      ^ 8X  d   \        R4      h\        V4      \        8w  d   \        R4      hVP	                  \
        4      \        8X  d   \        R4      h\        VR,          4      pV\        V4      9  d   \        R4      hV ! 4       p\        VR,          W#4      Vn        \        VR,          4      Vn        \        VR,          4      Vn        \        VR	,          4      Vn        \        VR
,          4      Vn        \        VR,          4      Vn        WEn        VR,          Vn        \        VR,          W#4      Vn        \        VR,          W#4      Vn        \        VR,          W#4      Vn        \        VR,          4      Vn        \        VR,          4      Vn        \        VR,          W#4      pVP$                  \0        8X  d-   VP                  P3                  R4      '       d   \4        Vn        VP$                  \6        8X  d   Rp. p\9        ^4       FN  p	 \        WV^,            4      p
\        W^,           V^,            4      pTP=                  Y34       T^,          pKP  	  \?        VR,          4      p\        VR,          4      pWV3Vn         VPC                  4       '       d!   VP                  PE                  R4      Vn        V'       d5   VP$                  \F        9  d    VR,           VP                  ,           Vn        V#   \:         d      K  i ; i)r<   zempty headerztruncated headerzend of file header:      Nzbad checksum:r<   d   N:r!  l   N:r"  t   N:r#  |   N:r$     N:r%  r  N:r      N:r&  i  N:i	  i)  N:i)  iI  N:iI  iQ  N:iQ  iY  N:iY  i  Nr  i  i  :i  i  N)$r,   r   r  r   countr-   r   rJ   r]   rG   r:   r   r   r#   r$   r!   r"   r  r  r  r  r  r  r  AREGTYPEr   r  GNUTYPE_SPARSErD   r*   r  boolr  r  rstrip	GNU_TYPES)r  rZ   r0   r1   r  objr  r   structsrI   r'  numbytes
isextendedorigsizes   &&&&          r2   frombufTarInfo.frombuf  ss    s8q=">22s8y &'9::99S>Y& !566S\"c**$^44es5z84s7|$c'l#c'l#s7|$G%	
w<3w<:Gh7	Gh7	3w<(3w<(S\84 88xCHH$5$5c$:$:CH
 88~%CG1X r!23F"3Rxb#9:H 12r	  c#hJ3w<(H#*"AC 99;;xxs+CH chhi/|chh.CH
 " s   )/LL('L(c                   VP                   P                  \        4      pV P                  W!P                  VP
                  4      pVP                   P                  4       \        ,
          Vn        VP                  V4      # r   )	r   rd   r  r2  r0   r1   r  r'  _proc_member)r  r[  rZ   r-  s   &&  r2   fromtarfileTarInfo.fromtarfile=  s\    
 oo""9-kk#//@__))+i7
((r4   c                *   V P                   \        \        39   d   V P                  V4      # V P                   \        8X  d   V P                  V4      # V P                   \        \        \        39   d   V P                  V4      # V P                  V4      # r   )r  r  r  _proc_gnulongr)  _proc_sparser  r  SOLARIS_XHDTYPE	_proc_pax_proc_builtin)r   r[  s   &&r2   r5  TarInfo._proc_memberR  sx     99)+;<<%%g..YY.($$W--YY7G_==>>'**%%g..r4   c                   VP                   P                  4       V n        V P                  pV P                  4       '       g   V P                  \
        9  d"   W P                  V P                  4      ,          pW!n        V P                  VP                  VP                  VP                  4       V P                  4       '       d!   V P                  P                  R 4      V n        V # )r  )r   r  rX  r  r  SUPPORTED_TYPES_blockr!   r'  _apply_pax_infor  r0   r1   r  r   r+  )r   r[  r'  s   && r2   r=  TarInfo._proc_builtin_  s     #??//1!!::<<499O;kk$)),,F 	W00'2B2BGNNS ::<<		((-DIr4   c                Z   VP                   P                  V P                  V P                  4      4      p V P	                  V4      pT P                  Tn        T P                  \        8X  d'   \        Y!P                  TP                  4      Tn        M:T P                  \        8X  d&   \        Y!P                  TP                  4      Tn        TP#                  4       '       d!   TP                  P%                  R4      Tn        T#   \
         d   p\        \        T4      4      R hR p?ii ; i)Nr  )r   rd   rA  r!   r6  r
   r   r  r'  r  r  r:   r0   r1   r   r  r  r  removesuffix)r   r[  rZ   nextr  s   &&   r2   r9  TarInfo._proc_gnulongu  s     oo""4;;tyy#9:	:##G,D kk99((C!1!17>>BDIYY**%5%5w~~FDM ::<<		..s3DI!  	:'A/T9	:s   D D*D%%D*c                Z   V P                   w  r#pV = V'       d   VP                  P                  \        4      p^ p\	        ^4       F^  p \        WVV^,            4      p\        WV^,           V^,            4      p	T'       d   T	'       d   TP                  Y34       T^,          pK`  	  \        VR,          4      pK  W n	        VP                  P                  4       V n        V P                  V P                  V P                  4      ,           Vn        W@n        V #   \         d      K  i ; i)r<   i  )r  r   rd   r  rD   rJ   r*   r  r*  rY  r  rX  rA  r!   r'  )
r   r[  r.  r0  r1  rZ   r   rI   r'  r/  s
   &&        r2   r:  TarInfo._proc_sparse  s     )-(<(<%X  //&&y1CC2Y r!23F"3Rxb#9:H hNNF#56r	  c#hJ"??//1))DKK		,BB	 " s   
/DD*)D*c                   VP                   P                  V P                  V P                  4      4      pV P                  \
        8X  d   VP                  pMVP                  P                  4       p^ pRp. p\        V4      V8  Ed8   W$,          ^ 8w  Ed*   \        P                  W$4      ;p'       g   \        R4      h \        VP                  ^4      4      pT^8  d   \        R4      hYH,           \        T4      8  d   \        R4      hTP                  ^4      T,           ^,
          p	Y'P!                  ^4      ^,           T	 p
T
P#                  R4      w  rpT'       d   TR8w  g   Y),          ^
8w  d   \        R4      hTP%                  YT34       TR8X  d   Tf   TR8X  d   TP&                  pMRpYH,          pEKH  Vf   RpV Fy  w  rpV P)                  VRRVP*                  4      pV\,        9   d)   V P)                  WVP&                  VP*                  4      pMV P)                  VRRVP*                  4      pWV&   K{  	   V P/                  V4      pRT9   d   T P7                  TT4       MXRT9   d   T P9                  TT4       M>TP;                  R	4      R
8X  d)   TP;                  R4      R8X  d   T P=                  TY14       T P                  \>        \@        39   d   TPC                  Y1P&                  TP*                  4       T PD                  Tn"        RT9   da   TPF                  pTPI                  4       '       g   TP                  \J        9  d#   TTP                  TP                  4      ,          pTTn"        T#   \         d    \        R4      hi ; i  \0         d   p\3        \5        T4      4      RhRp?ii ; i)r<   NrA   r  s
   hdrcharsets   BINARYr(   GNU.sparse.mapGNU.sparse.sizezGNU.sparse.major1zGNU.sparse.minorr@   r!   )&r   rd   rA  r!   r  r  r  r  r,   _header_length_prefix_rematchrG   rE   groupr*   rL  rp   	partitionr  r0   _decode_pax_fieldr1   PAX_NAME_FIELDSr6  r
   r   r  _proc_gnusparse_01_proc_gnusparse_00r  _proc_gnusparse_10r  r;  rB  r'  rX  r  r@  )r   r[  rZ   r  r   r0   raw_headersrO  r/   header_value_end_offsetkeyword_and_valueraw_keywordequals	raw_valuer  r  rF  r  r'  s   &&                 r2   r<  TarInfo._proc_pax  sW   
 oo""4;;tyy#9:
 99!--K!--224K #hnT!15;;CEEEE()9::;U[[^,
 z()9::|c#h&()9::&+kk!nv&=&A# #IIaL1$45L M->-H-H-N*K &D.C4PTX4X()9::Y?@ m+0@	)&//H&HMC H /:*F ,,['7NN$G/)..yGDTDT( ..y'7( $) # /:(	:##G,D
 {*##D+6+-##D+6__/0C7KOOL^<_cf<f##D+?99/22  .>.>O++DK$ ))::<<499O#Cdkk$))44F!'y  ;()9::;|  	:'A/T9	:s$   ?N N NO(N==Oc                   . p. pV Fj  w  rVpVR 8X  d,    VP                  \        VP                  4       4      4       K8  VR8X  g   KA   VP                  \        VP                  4       4      4       Kl  	  \        \        W44      4      Vn        R#   \         d    \	        R4      hi ; i  \         d    \	        R4      hi ; i)s   GNU.sparse.offsetrA   s   GNU.sparse.numbytesN)r  rE   r8   r*   rG   listziprY  )r   rF  rW  offsetsr/  _r  r  s   &&&     r2   rU  TarInfo._proc_gnusparse_00%  s     !,A..?NN3u||~#67 22?OOC$78 "- 3w12 " ?,-=>>? " ?,-=>>?s   (B	(B*B'*Cc                    VR ,          P                  R4       Uu. uF  p\        V4      NK  	  pp\        \        VR,          VR,          4      4      Vn        R# u upi )rK  ,NN      Nrg  N)r  rE   r_  r`  rY  )r   rF  r  xrY  s   &&&  r2   rT  TarInfo._proc_gnusparse_019  sP     #..>"?"E"Ec"JK"JQ#a&"JK3vc{F4L9: Ls   Ac                   R p. pVP                   P                  \        4      pVP                  R^4      w  rF\	        V4      p\        V4      V^,          8  d]   RV9  d&   WcP                   P                  \        4      ,          pVP                  R^4      w  rvVP                  \	        V4      4       Ks  VP                   P                  4       Vn        \        \        VR,          VR,          4      4      Vn        R # )Nr  rf  rh  )r   rd   r  r  rE   r,   r  r  rX  r_  r`  rY  )r   rF  r  r[  fieldsrY  rZ   numbers   &&&&    r2   rV  TarInfo._proc_gnusparse_10?  s     oo""9-iiq)V&kFQJ&C++I66))E1-KFMM#f+&"??//13vc{F4L9:r4   c                   VP                  4        F  w  rEVR 8X  d   \        V RV4       K  VR8X  d   \        V R\        V4      4       K:  VR8X  d   \        V R\        V4      4       KY  V\        9   g   Kf  V\        9   d    \        V,          ! V4      pVR8X  d   VP                  R4      p\        WV4       K  	  VP                  4       V n        R#   \
         d    ^ p LNi ; i)zGNU.sparse.namer   rL  r!   zGNU.sparse.realsizer  N)	r  setattrrE   
PAX_FIELDSPAX_NUMBER_FIELDSr*   r+  r  r  )r   r  r0   r1   r  r  s   &&&&  r2   rB  TarInfo._apply_pax_infoO  s     *//1NG++fe,--fc%j111fc%j1J&//" 1' :5 A f$!LL-Eu- 2" '++- & " !"s   CC%$C%c                l     VP                  VR 4      #   \         d    TP                  Y44      u # i ; ir  )r8   UnicodeDecodeError)r   r  r0   fallback_encodingfallback_errorss   &&&&&r2   rR  TarInfo._decode_pax_fieldf  s:    	D<<(33! 	D<< 1CC	Ds    33c                    V^ 8  d   \        R4      h\        V\        4      w  r#V'       d
   V^,          pV\        ,          # )r<   zinvalid offset)rG   rc   r  )r   r'  rj   rk   s   &&  r2   rA  TarInfo._blockn  s=    
 19$%566"5)4aKF	!!r4   c                (    V P                   \        9   # r   )r  REGULAR_TYPESr   s   &r2   r  TarInfo.isregz  s    yyM))r4   c                "    V P                  4       # r   )r  r   s   &r2   isfileTarInfo.isfile~  s    zz|r4   c                (    V P                   \        8H  # r   )r  r  r   s   &r2   r  TarInfo.isdir      yyG##r4   c                (    V P                   \        8H  # r   )r  SYMTYPEr   s   &r2   r  TarInfo.issym  r  r4   c                (    V P                   \        8H  # r   )r  LNKTYPEr   s   &r2   r  TarInfo.islnk  r  r4   c                (    V P                   \        8H  # r   )r  r	  r   s   &r2   ischrTarInfo.ischr  r  r4   c                (    V P                   \        8H  # r   )r  r
  r   s   &r2   isblkTarInfo.isblk  r  r4   c                (    V P                   \        8H  # r   )r  FIFOTYPEr   s   &r2   isfifoTarInfo.isfifo  s    yyH$$r4   c                    V P                   R J# r   )rY  r   s   &r2   issparseTarInfo.issparse  s    {{$&&r4   c                >    V P                   \        \        \        39   # r   )r  r	  r
  r  r   s   &r2   isdevTarInfo.isdev  s    yyWgx888r4   )r  r  r  r  r$   r  r  r   r"   r   r'  rX  r  r!   rY  r  r#   r  rw   )r   )7ry   rz   r{   r|   dict	__slots__r   rT  r[  setterr   r  r  r  r   r  DEFAULT_FORMATENCODINGr  r  r  r  classmethodr   r  staticmethodr  r  r  r  r2  r6  r5  r=  r9  r:  r<  rU  rT  rV  rB  rR  rA  r  r  r  r  r  r  r  r  r  r  r}   r   r   s   @r2   r   r   p  s      
,
!
 G
 H	

  
 -
 $
>
F
 
 
 *
  *!
" /#
$ 5%
&9'
* .+
, -
. /
0 1
I60   ^^      
[[    __! !O"'.3>C$,19>  "'88 *HEV /"IM8Qt M M
  ' 'R   * *  0- 0-d < <| ) )(/,68wr3(;; ..D
"*$$$$$%'9 9r4   c            
       $  a  ] tR tRt o ^ tRtRt^t]t	]
tRt]t]tRtRAR lt]RRR]3R l4       t]RBR l4       t]RCR l4       t]RCR	 l4       t]RDR
 l4       t]RER l4       tRRRRRRRRRR/tR tR tR tR tRFR lt RGRR/R llt!RHRR/R llt"RIR lt#R  t$RJR!RRR/R" llt%R# t&RKR!RRR/R$ llt'R% t(RIR& lt)R' t*R( t+R) t,RLR*RR+R/R, llt-R- t.R. t/R/ t0R0 t1R1 t2R2 t3R3 t4R4 t5R5 t6R6 t7R7 t8RMR8 lt9R9 t:RIR: lt;R; t<R< t=R= t>R> t?R? t@R@tAV tBR# )Nr   i  FNr   c                   R RRRRRRR/pW/9  d   \        R4      hW n        W,          V n        V'       gb   V P                  R8X  d4   \        P                  P                  V4      '       g   RV n        RV n        \        WP                  4      pR	V n        MrVfE   \        VR4      '       d3   \        VP                  \        \        34      '       d   VP                  p\        VR4      '       d   VP                  V n        RV n        V'       d    \        P                  P                  V4      MR
V n
        W0n        Wn        Ve   W@n        Ve   WPn        Ve   W`n        Ve   Wpn        Ve   Wn        Wn        V
e   V P                   \,        8X  d   Wn        M/ V n        Ve   Wn        Ve   Wn        Wn        R	V n        . V n        R	V n        V P                  P=                  4       V n        / V n         / V n!        / V n"         V P                  R 8X  d   R
V n#        V PI                  4       V n#        V P                  R8X  d`    V P                  PK                  V P>                  4        V P"                  PM                  V 4      pV P8                  PO                  V4       K_  V P                  R9   d   RV n        V P.                  '       ds   V P"                  PW                  V P.                  PY                  4       4      pV P                  P[                  V4       V ;P>                  \]        V4      ,          un        R
# R
# R
#   \P         d*    T P                  PK                  T P>                  4        K  \R         d   p\U        \        T4      4      R
hR
p?ii ; i   T P                  '       g   T P                  P_                  4        RT n        h ; i)r   r2  azr+br   wbrj  xb!mode must be 'r', 'a', 'w' or 'x'FNr   r   Tr  r   rj  )0r*   r   _moder   r   exists	bltn_openr   r   r  r   r  rL   abspathr   streamrQ   r\  dereferenceignore_zerosr0   r1   r  r  debug
errorlevelcopybufsizer   members_loadedr  r'  inodes_unames_gnamesfirstmemberrF  r  r6  r  r   r
   r   r   r  re   r,   r   )r   r   r   r   rQ   r\  r  r  r0   r1   r  r  r  r  r  modesr  rZ   s   &&&&&&&&&&&&&&&   r2   r   TarFile.__init__  s    dCT3=@AA	[
yyCt(<(<	!
jj1G$D&!9!97<<#u66||w''$\\
#D-1BGGOOD)t	  K"L"*# ,$M"t{{j'@*!DJ!(O 'll'')	yyC#' #'99; yyC LL%%dkk2:"&,,":":4"@++G4 yyO+####,,??@P@P@U@U@WXCLL&&s+KK3s8+K $ , * ))$++6& :'A/T9:	###""$DKsJ   A$N ,6M "+N A0N 0N4N 7N NNNN 6Oc           	       a  V'       g   V'       g   \        R 4      hVR9   d   V 3R lp. p\        S P                  VR7       F@  p\        S S P                  V,          4      p	Ve   VP	                  4       p
 V	! VRV3/ VB u # 	  RP                  V4      p\        RV 24      hR	V9   dx   VP                  R	^4      w  rT;'       g    RpT;'       g    R
pVS P                  9   d   \        S S P                  V,          4      p	M\        RV,          4      hV	! WV3/ VB # RV9   d   VP                  R^4      w  rT;'       g    RpT;'       g    R
pVR9  d   \        R4      hRV9   d   VR9  d   \        R4      hRV9   d   VR9  d   \        R4      hVP                  R^	4      pVP                  RR4      p\        WWVW4      p S ! WV3/ VB pRTn        T# VR9   d   S P                  ! WV3/ VB # \        R4      h  \
        \        3 d:   pTP                  RT RT: 24       Te   TP                  X
4        Rp?EK	  Rp?ii ; i   TP                  4        h ; i)znothing to openr   c                 0   < SP                   V ,          R 8H  # )taropen)	OPEN_METH)r   r  s   &r2   not_compressed$TarFile.open.<locals>.not_compresseda  s    }}X.);;r4   )keyNz	- method z: 
z'file could not be opened successfully:
:r   r   |zmode must be 'r' or 'w'r   z4compresslevel is only valid for w|gz and w|bz2 modesr   z"preset is only valid for w|xz modeFzundiscernible mode)r   r:*)r   r   )r   r   )r   r  )r*   sortedr  rq   r  r   r   r  r  r  r  popr   r   r   r  )r  r   r   r   ri   kwargsr  
error_msgsr   func	saved_posr  error_msgs_summaryfilemoder   r   r  r  s   f&&&&,            r2   r   TarFile.open1  s{   V G.//<<J"3==nEsCMM($;<& 'Ic7=f== F "&:!6FGYFZ[\\D[!%C!3H3H((5H 3==(sCMM($;<&'Dx'OPP:6::D[!%C!3H3H((5Hz) !:;;&(X]-J J  6!hg&= !EFF"JJ:MZZ$/FTX*4F9&9 "AMH_$;;t7=f==-..e "#34 %%	(2aU&CD*Y/	Rs$   8
H
I I-III'c                :    VR9  d   \        R4      hV ! WV3/ VB # )r   r  )r   r  r   rj  )r*   )r  r   r   r   r  s   &&&&,r2   r  TarFile.taropen  s+     ++@AA4w1&11r4   c                   VR9  d   \        R4      h ^ RIHp  T! YR,           YC4      p T P                  ! YT3/ TB pRTn	        T#   \         d    \	        R4      Rhi ; i  \
         d   pTe   TR 8X  d   \        R4      Thh Rp?ii ; i  \
         d*   pTP                  4        TR 8X  d   \        R4      Thh Rp?i TP                  4        h ; i)	r   mode must be 'r', 'w' or 'x')GzipFilezgzip module is not availableNrl   r   Fr   r   rj  )
r*   gzipr  r   r   r   r   r  r   r   )	r  r   r   r   r   r  r  r  r  s	   &&&&&,   r2   gzopenTarFile.gzopen  s    
 &;<<	M%	tCZHG		D:6:A +  	M"#ABL	M
  	"ts{ 129	  	MMOs{ 129	MMOs9   A	 A$ B 	A!$B/BBC$B>>Cc                j   VR9  d   \        R4      h ^ RIHp T! T;'       g    TY$R7      p T P
                  ! YT3/ TB pRTn
        T#   \         d    \	        R4      Rhi ; i  \        \        3 d*   pTP                  4        TR 8X  d   \        R4      Thh Rp?i TP                  4        h ; i)	r   r  )BZ2Filer   N)r   znot a bzip2 fileFr  )r*   r   r  r   r   r  r   EOFErrorr   r   r   )	r  r   r   r   r   r  r  r  r  s	   &&&&&,   r2   bz2openTarFile.bz2open  s    
 &;<<	L# '//T4M		D:6:A !  	L"#@AtK	L " 	MMOs{ 23:	MMOs"   A A' A$'B28$BB2c                f   VR9  d   \        R4      h ^ RIHpHp T! T;'       g    TY$R7      p T P                  ! YT3/ TB pRTn
        T#   \         d    \        R4      Rhi ; i  T\        3 d*   p	TP                  4        TR 8X  d   \        R4      T	hh Rp	?	i TP                  4        h ; i)	r   r  )LZMAFiler   r   Nr   znot an lzma fileFr  )r*   r   r  r   r   r   r  r  r   r   r   )
r  r   r   r   r   r  r  r   r  r  s
   &&&&&,    r2   xzopenTarFile.xzopen  s    
 &;<<	M0 7??dD@		D:6:A !  	M"#ABL	M 8$ 	MMOs{ 23:	MMOs"   A A) A&)B06$BB0c                   VR9  d   \        R4      h ^ RIHpHp	 T! T;'       g    TTTTTR7      p T P                  ! YT3/ TB p
RT
n        T
#   \         d    \        R4      Rhi ; i  T	\        3 d*   pTP                  4        TR 8X  d   \        R4      Thh Rp?i\         d    TP                  4        h i ; i)	r   r  )ZstdFiler   r   N)leveloptions	zstd_dictznot a zstd fileFr  )r*   compression.zstdr  r   r   r   r  r  r   r   	Exceptionr   )r  r   r   r   r  r  r  r  r  r   r  r  s   &&&&&&&,    r2   zstopenTarFile.zstopen  s     &;<<	Y< OOt
		D:6:A -  	Y"#MNTXX	Y 8$ 	MMOs{ 129 	MMO	s(   A A, A),B=9$BB=*B=r   r  r   r  r   r  r   r  r   r  c                r   V P                   '       d   R # RV n          V P                  R9   d   V P                  P                  \        \
        ^,          ,          4       V ;P                  \
        ^,          ,          un        \        V P                  \        4      w  rV^ 8  d2   V P                  P                  \        \        V,
          ,          4       V P                  '       g   V P                  P                  4        R # R #   T P                  '       g   T P                  P                  4        i i ; i)NTr  )r   r   r   re   r-   r  r'  rc   
RECORDSIZEr   r   )r   rj   rk   s   &  r2   r   TarFile.close.  s     ;;;	%yyO+""3)a-#89	A. %+4;;
$C!q=LL&&sj9.D'EF###""$ $4###""$ $s   B:D /D6c                r    V P                  VP                  R 4      4      pVf   \        RV,          4      hV# )r  zfilename %r not found)
_getmemberr+  KeyError)r   r   r\  s   && r2   	getmemberTarFile.getmemberC  s6     //$++c"23?2T9::r4   c                ~    V P                  4        V P                  '       g   V P                  4        V P                  # r   )_checkr  _loadr  r   s   &r2   
getmembersTarFile.getmembersN  s)     	|||JJL||r4   c                ^    V P                  4        Uu. uF  qP                  NK  	  up# u upi r   )r  r   )r   r\  s   & r2   getnamesTarFile.getnamesX  s'     -1OO,=>,=,=>>>s   *c                	   V P                  R 4       Ve   VP                  pVf   Tp\        P                  P	                  V4      w  rBVP                  \        P                  R4      pVP                  R4      pV P                  4       pWn	        VfA   V P                  '       g   \        P                  ! V4      pM;\        P                  ! V4      pM$\        P                  ! VP                  4       4      pRpVP                  p\        P                   ! V4      '       d   VP"                  VP$                  3p	V P                  '       gS   VP&                  ^8  dB   WP(                  9   d2   W P(                  V	,          8w  d   \*        p
V P(                  V	,          pM\,        p
V	^ ,          '       d   W P(                  V	&   M\        P.                  ! V4      '       d   \0        p
M\        P2                  ! V4      '       d   \4        p
M\        P6                  ! V4      '       d   \8        p
\        P:                  ! V4      pMH\        P<                  ! V4      '       d   \>        p
M%\        P@                  ! V4      '       d   \B        p
MR# W%n        Wn"        VPF                  Vn$        VPJ                  Vn&        V
\,        8X  d   VPN                  Vn(        M^ Vn(        VPR                  Vn*        Wn+        Wun,        \Z        '       d}   VPH                  V P\                  9  d@    \Z        P^                  ! VPH                  4      ^ ,          V P\                  VPH                  &   V P\                  VPH                  ,          Vn1        \d        '       d}   VPL                  V Pf                  9  d@    \d        Ph                  ! VPL                  4      ^ ,          V Pf                  VPL                  &   V Pf                  VPL                  ,          Vn5        V
\>        \B        39   dw   \m        \        R4      '       da   \m        \        R4      '       dK   \        Pn                  ! VPp                  4      Vn9        \        Pt                  ! VPp                  4      Vn;        V#   \`         d    RT P\                  TPH                  &    ELZi ; i  \`         d    RT Pf                  TPL                  &    Li ; i)awxNr  r   majorminor)<r  r   r   r   
splitdriver   r  r  r\  r  r  lstatstatfstatfilenost_modeS_ISREGst_inost_devst_nlinkr  r  r  S_ISDIRr  S_ISFIFOr  S_ISLNKr  readlinkS_ISCHRr	  S_ISBLKr
  r   st_uidr#   st_gidr$   st_sizer!   st_mtimer"   r  r  pwdr  getpwuidr  r  grpr  getgrgidr  r   r  st_rdevr  r  r  )r   r   arcnamer   drvr\  statresr  stmdinoder  s   &&&&       r2   
gettarinfoTarFile.gettarinfo^  sX    	E <<D
 ?Gww))'2//"&&#...% ,,. ?###((4.''$-hhw~~/0G<<^^W^^4E###(8(81(<[[(WE8J-J ;;u- 88)0KK&\\$D]]4  D\\$D{{4(H\\$D\\$D nnnn7?"??GLGL((# 3{{$,,.303W[[0I!0LDLL- !LL5GM3{{$,,.303W[[0I!0LDLL- !LL5GMGW%%r7##G(<(<#%88GOO#< #%88GOO#<    302DLL-3   302DLL-3s$    >R (>R< $R98R9<$S#"S#r  c                  \         \        P                  \        \        P                  \
        \        P                  \        \        P                  \        \        P                  \        \        P                  /pV P                  4        Vf   T pV EF3  pV'       Ed}   VP                  f   \        R4       MKVP!                  VP"                  ^ 4      p\        \        P$                  ! WTP                  ,          4      4       \        VP&                  ;'       g    VP(                  : RVP*                  ;'       g    VP,                  : 24       VP/                  4       '       g   VP1                  4       '       d1   \        RRVP2                  VP4                  3,          ,          4       M\        RVP6                  ,          4       VP8                  f   \        R4       M7\        R\:        P<                  ! VP8                  4      R,          ,          4       \        VP>                  VPA                  4       '       d   RMR	,           4       V'       de   VPC                  4       '       d   \        R
VPD                  ,           4       VPG                  4       '       d   \        RVPD                  ,           4       \I        4        EK6  	  R # )Nz
??????????r  z%10sz%d,%dz%10dz????-??-?? ??:??:??z%d-%02d-%02d %02d:%02d:%02d:N   Nr   z-> zlink to )%r  r   S_IFREGr  S_IFLNKr  S_IFIFOr	  S_IFCHRr  S_IFDIRr
  S_IFBLKr  r   ru   r  r  r  r  r#   r  r$   r  r  r  r  r!   r"   r   	localtimer   r  r  r  r  rt   )r   verboser  	type2moder\  modetypes   &&$   r2   r_  TarFile.list  s    dllGT\\t||WdlldllGT\\C	 	?GGw<<'-(}}W\\1=Hh.E FGw}}'C'C'C'.}}'C'C'CE F==??gmmoo$(8(8':J:J'KK!M N   56==( 56 ="&.."?"C!D E w}}BGH==??(8(8 89==??
W-=-= =>G7 r4   filterc                  V P                  R 4       Vf   TpV P                  eJ   \        P                  P	                  V4      V P                  8X  d   V P                  ^RV,          4       R# V P                  ^V4       V P                  W4      pVf   V P                  ^RV,          4       R# Ve(   V! V4      pVf   V P                  ^RV,          4       R# VP                  4       '       d1   \        VR4      ;_uu_ 4       pV P                  WV4       RRR4       R# VP                  4       '       d   V P                  V4       V'       dw   \        \        P                  ! V4      4       FQ  pV P                  \        P                  P                  W4      \        P                  P                  W&4      W4R7       KS  	  R# R# V P                  V4       R#   + '       g   i     R# ; i)r  Nztarfile: Skipped %rztarfile: Unsupported type %rtarfile: Excluded %rr2  )r+  )r  r   r   r   r  _dbgr  r  r  addfiler  r  listdiraddr  )r   r   r  	recursiver+  r\  fs   &&&&$  r2   r1  TarFile.add  sq    	E?G 99 RWW__T%:dii%GIIa.56		!T //$0?IIa7$>? WoG		!3d:; ==??4&&!W( '& ]]__LL!

4 01AHHRWW\\$2BGGLL4L%  6 2  LL! '&&s   GG-	c                8   V P                  R 4       Vf3   VP                  4       '       d   VP                  ^ 8w  d   \        R4      h\        P                  ! V4      pVP                  V P                  V P                  V P                  4      pV P                  P                  V4       V ;P                  \        V4      ,          un        V P                  pVe   \        W P                  VP                  VR7       \        VP                  \         4      w  rVV^ 8  d;   V P                  P                  \"        \         V,
          ,          4       V^,          pV ;P                  V\         ,          ,          un        V P$                  P'                  V4       R# )r  Nz3fileobj not provided for non zero-size regular file)ri   )r  r  r!   r*   r  r  rQ   r0   r1   r   re   r'  r,   r  rb   rc   r  r-   r  r  )r   r\  r   rZ   ri   rj   rk   s   &&&    r2   r/  TarFile.addfile&	  s    	E?w}}7<<13DRSS))G$mmDKKD3s3x  w||WM &w||Y ?F1}""3)i*?#@A!KK6I--KG$r4   c                    Vf:   V P                   pVf   \        # \        V\        4      '       d   \	        R4      hV# \        V4      '       d   V#  \        V,          #   \         d    \        RT: R24      R hi ; i)Nzfilter z
 not foundzrString names are not supported for TarFile.extraction_filter. Use a function such as tarfile.data_filter directly.)	extraction_filterr  r  r  	TypeErrorcallable_NAMED_FILTERSr  r*   )r   r+  s   &&r2   _get_filter_functionTarFile._get_filter_functionB	  s    >++F~""&#&&67 7 MFM	G!&)) 	Gwvj
;<$F	Gs   A A<numeric_ownerc          	        . pV P                  V4      pVf   T pV Fl  pV P                  WvV4      w  rVf   K  VP                  4       '       d   VP                  V	4       V P	                  WVP                  4       '       * VVR7       Kn  	  VP                  R RR7       V F  p	  V! W4      pTf   T P                  T	R4       K%  \        P                  P                  YP                  4      p \        P                  ! T4      p\        P                   ! TP"                  4      '       g   T P                  TR4       K  T P%                  YTR7       T P'                  Y4       T P)                  Y4       K  	  R #   \         d(   p
T P                  T	\        T
4      4        R p
?
EK  R p
?
ii ; i  \         d    T P                  TR4        EK0  i ; i  \*         d   pT P-                  T4        R p?EKW  R p?ii ; i)	N)	set_attrsr>  filter_functionc                     V P                   # r   r  )r  s   &r2   <lambda>$TarFile.extractall.<locals>.<lambda>w	  s    qvvr4   T)r  reversezexcluded by filtermissingznot a directory)r>  )r<  _get_extract_tarinfor  r  _extract_onesort_FILTER_ERRORS_log_no_directory_fixupreprr   r   r  r   r  FileNotFoundErrorr   r  r  chownutimechmodr	   _handle_nonfatal_error)r   r   r  r>  r+  directoriesrA  r  r\  
unfilteredexcdirpathr  r  s   &&&$$         r2   
extractallTarFile.extractallT	  s    33F;?GF"&";";#/G}} "":.g7==?7J,9.=  ?  	-t< &J/-j?G ?001EG'',,t\\:HHW-E ||EMM22 00:KL

7=
I

7,

7,5 & & 00T#YG ) 00)D   /++A../sr   'E</G)G1F1%G-G5G<F.F)"G)F..G1GGGGG>!G99G>c                P    V P                  ^RVP                  : RV: R24       R# )rg  z!tarfile: Not fixing up directory z ()N)r.  r   )r   r  reasons   &&&r2   rK  TarFile._log_no_directory_fixup	  s    		!;;( 	)r4   c                   V P                  V4      pV P                  WV4      w  rxVe   V P                  WrW44       R # R # r   )r<  rG  rH  )	r   r  r   r@  r>  r+  rA  r\  rS  s	   &&&&$$   r2   extractTarFile.extract	  sG     33F;"77T+gYF r4   c                (   \        V\        4      '       d   V P                  V4      pMTpR p V! WC4      pVf&   V P                  ^RVP                  ,          4       R# VP                  4       '       dE   \        P                  ! V4      p\        P                  P                  W5P                   4      Vn        WT3#   \        \        \
        3 d   pT P                  T4        R p?LR p?i\         d   pT P                  T4        R p?LR p?ii ; i)Nr-  )NN)r  r  r  r   r  r   _handle_fatal_errorr	   rQ  r.  r   r  r  r   r   r  r  r  )r   r  rA  r   rS  filteredr  s   &&&&   r2   rG  TarFile._get_extract_tarinfo	  s     fc""/JJ	+&z8H
 IIa/*//AB >>yy*H$&GGLL7H7H$IH!## +[9 	($$Q'' 	+''**	+s)   B< <DC((D5D6DDc           	     P   V P                  R 4        V P                  V\        P                  P	                  W!P
                  4      VVVVR7       R#   \        \        3 d   pT P                  T4        Rp?R# Rp?i\         d   pT P                  T4        Rp?R# Rp?ii ; i)r   )r@  r>  rA  extraction_rootN)r  _extract_memberr   r   r  r   r   r  r`  r	   rQ  )r   r\  r   r@  r>  rA  r  s   &&&&&& r2   rH  TarFile._extract_one	  s     	C		+  "'',,t\\*J+4/<1@15	 ! 7
 +, 	($$Q'' 	+''**	+s)   >A B%$A;;B%B%	B  B%c                \    V P                   ^8  d   h V P                  ^RV,          4       R# )ri  tarfile: %sN)r  r.  r   r  s   &&r2   rQ  TarFile._handle_nonfatal_error	  s$    ??QIIa*+r4   c                v   V P                   ^ 8  d   h \        V\        4      '       dd   VP                  f&   V P	                  ^RVP
                  ,          4       R# V P	                  ^RVP
                  : RVP                  : 24       R# V P	                  ^R\        V4      P                  : RV: 24       R# )r<   Nrh  z	tarfile: ro   )r  r  r   filenamer.  strerrorr  ry   ri  s   &&r2   r`  TarFile._handle_fatal_error	  sw    ??Q7##zz!		!]QZZ78		!QZZHIIIaT!W-=-=qABr4   c                   V P                  R 4       \        V\        4      '       d   V P                  V4      pMTpVP	                  4       '       g   VP
                  \        9  d   V P                  W4      # VP                  4       '       g   VP                  4       '       dL   \        V P                  \        4      '       d   \        R4      hV P                  V P                  V4      4      # R# )r   z'cannot extract (sym)link as file objectN)r  r  r  r  r  r  r@  
fileobjectr  r  r   r   r   extractfile_find_link_target)r   r  r\  s   && r2   rq  TarFile.extractfile	  s     	Cfc""nnV,GG==??gll/A??411]]__$,,00 ""KLL ''(>(>w(GHH r4   rA  rd  c               (   VP                  R 4      pVP                  R \        P                  4      p\        P                  P                  V4      pV'       d>   \        P                  P                  V4      '       g   \        P                  ! VRR7       VP                  4       '       g   VP                  4       '       d/   V P                  ^VP                  : RVP                  : 24       MV P                  ^VP                  4       VP                  4       '       d   V P                  W4       EMVP                  4       '       d   V P!                  W4       MVP#                  4       '       d   V P%                  W4       MVP'                  4       '       g   VP)                  4       '       d   V P+                  W4       MyVP                  4       '       g   VP                  4       '       d   V P-                  WVVR7       M8VP.                  \0        9  d   V P3                  W4       MV P                  W4       V'       dO   V P5                  WV4       VP                  4       '       g%   V P7                  W4       V P9                  W4       R# R# R# )r  T)exist_okz -> rA  rd  N)r+  r   r   r  r   r  r  makedirsr  r  r.  r   r  r  makefiler  makedirr  makefifor  r  makedevmakelink_with_filterr  r@  makeunknownrN  rP  rO  )r   r\  
targetpathr@  r>  rA  rd  	upperdirss   &&&&&$$ r2   re  TarFile._extract_member
  s     &&s+
''RVV4
 GGOOJ/	RWW^^I66 KK	D1==??gmmooIIaw||W5E5EFGIIa&==??MM'.]]__LL-^^MM'.]]__LL-]]__%% / / & 1 \\0W1MM'.JJwM:==??

7/

7/ # r4   c                     VP                   f   \        P                  ! V4       R # \        P                  ! VR4       R #   \         d+    \        P                  P                  T4      '       g   h  R # i ; i)Ni  )r   r   mkdirFileExistsErrorr   r  r   r\  r~  s   &&&r2   ry  TarFile.makedirN
  sW    
	||#$ U+ 	77==,, -	s   $A A /A61A65A6c           
        V P                   pVP                  VP                  4       V P                  p\	        VR 4      ;_uu_ 4       pVP
                  ee   VP
                   F(  w  rgVP                  V4       \        W5V\        V4       K*  	  VP                  VP                  4       VP                  4        M\        W5VP                  \        V4       RRR4       R#   + '       g   i     R# ; i)r  N)
r   r  rX  r  r  rY  rb   r   r!   truncate)r   r\  r~  sourceri   targetr'  r!   s   &&&     r2   rx  TarFile.makefile]
  s     G''(""z4((F~~)$+NNLFKK'iI %3 GLL)!FGLL)WM )(((s   BC!!C2	c                n    V P                  W4       V P                  ^RVP                  ,          4       R# )ri  z9tarfile: Unknown file type %r, extracted as regular file.N)rx  r.  r  r  s   &&&r2   r}  TarFile.makeunknownm
  s1     	g*		! 24;LLA 	Br4   c                t    \        \        R 4      '       d   \        P                  ! V4       R# \        R4      h)mkfifozfifo not supported by systemN)r   r   r  r	   r  s   &&&r2   rz  TarFile.makefifou
  s)     2x  IIj!=>>r4   c                   \        \        R 4      '       d   \        \        R4      '       g   \        R4      hVP                  pVf   RpVP	                  4       '       d   V\
        P                  ,          pMV\
        P                  ,          p\        P                  ! W#\        P                  ! VP                  VP                  4      4       R# )mknodr{  z'special devices not supported by systemNr  )r   r   r	   r   r  r   r%  r#  r  r{  r  r  )r   r\  r~  r   s   &&& r2   r{  TarFile.makedev}
  s     r7##72y+A+AHII||<D==??DLL DDLL D
G,,g.>.>?	Ar4   c                (    V P                  WR R 4      # r   )r|  r  s   &&&r2   makelinkTarFile.makelink
  s    ((dDIIr4   c                   R p VP                  4       '       d_   \        P                  P                  V4      '       d   \        P                  ! V4       \        P
                  ! VP                  V4       R# \        P                  P                  VP                  4      '       d$   \        P                  ! VP                  V4       R#   V P                  V4      pTf   TpMTf   \        R4      h T! Yd4      pTe   T P#                  YrTTR7       R# R#   \         d    Rp L\i ; i  \         d    T'       d   \        R4      Rhh i ; i  \         d   p\        YP                   4      ThRp?ii ; i)FNTz%unable to resolve link inside archiverv  z[makelink_with_filter: if filter_function is not None, extraction_root must also not be None)r  r   r   lexistsunlinksymlinkr  r  r  linksymlink_exceptionrr  r  r	   rJ  r   r   re  )	r   r\  r~  rA  rd  keyerror_to_extracterrorrS  ra  causes	   &&&&&    r2   r|  TarFile.makelink_with_filter
  s_    $) 	,}}77??:..IIj)

7++Z877>>'"6"677GGG00*= 8	//8J "!H&">? ?M*:G   1@1@ ! B  / ! 	,'+$	,
  	'";=BFG 	  " M'AuLMsQ   D $D 7D 8.D '!D D+ 4E D('D(+E>EE5E00E5c                *   \        \        R 4      '       Ed5   \        P                  ! 4       ^ 8X  Ed   VP                  pVP                  pV'       g    \
        '       d:   VP                  '       d(   \
        P                  ! VP                  4      ^,          p \        '       d:   TP                  '       d(   \        P                  ! TP                  4      ^,          pVf   RpVf   Rp VP                  4       '       d0   \        \        R4      '       d   \        P                  ! W%V4       R# \        P                  ! W%V4       R# R# R#   \         d     Li ; i  \         d     Li ; i  \        \         3 d   p\#        R4      ThRp?ii ; i)geteuidNlchownzcould not change ownerr6   )r   r   r  r$   r#   r  r  getgrnamr  r  r  getpwnamr  r  rN  r   OverflowErrorr	   )r   r\  r~  r>  gur  s   &&&&   r2   rN  TarFile.chown
  s)    2y!!bjjla&7AA sw}}}LL7:sw}}}LL7: yyD==??wr8'<'<IIjQ/HHZA./ '8!   
    ]+ D"#;<!CDs`   E  E 2'E E &E 8'E ,E0 -E0 1E0 EEE-,E-0FFFc                    VP                   f   R #  \        P                  ! W!P                   4       R #   \         d   p\	        R4      ThR p?ii ; i)Nzcould not change mode)r   r   rP  r   r	   )r   r\  r~  r  s   &&& r2   rP  TarFile.chmod
  sD     <<	?HHZ. 	?67Q>	?s    4 AAAc                    VP                   pVf   R # \        \        R4      '       g   R #  \        P                  ! W#V34       R #   \         d   p\        R4      ThR p?ii ; i)NrO  z"could not change modification time)r"   r   r   rO  r   r	   )r   r\  r~  r"   r  s   &&&  r2   rO  TarFile.utime
  s[     =r7##	LHHZ0 	LCD!K	Ls   A A"AA"c                   V P                  R 4       V P                  e   V P                  pRV n        V# V P                  V P                  P	                  4       8w  dl   V P                  ^ 8X  d   R# V P                  P                  V P                  ^,
          4       V P                  P                  ^4      '       g   \        R4      hRp  V P                  P                  V 4      p Te0   T P0                  '       g   T P2                  P5                  T4       T# RT n        T#   \         de   pT P                  '       dI   T P                  ^RT P                  T3,          4       T ;P                  \        ,          un         Rp?K   Rp?LRp?i\         d   pT P                  '       dJ   T P                  ^RT P                  T3,          4       T ;P                  \        ,          un         Rp?EK-  T P                  ^ 8X  d   \        \        T4      4      Rh Rp?EL<Rp?i\          d"    T P                  ^ 8X  d   \        R4      Rh ELj\"         d2   pT P                  ^ 8X  d   \        \        T4      4      Rh Rp?ELRp?i\$         d   p\        \        T4      4      RhRp?i\&         dH   p ^ RIp\+        Y4P,                  4      '       d   \        RT 24      RhTh  \.         d    Thi ; iRp?ii ; i)raNr`   Tz0x%X: %sz
empty filezzlib error: )r  r  r'  r   r  r  rd   r   r\  r6  r   r  r.  r  rG   r  r   r   r   r  r   r  r   r   r  r  r  r  )r   mr\  r  r   s   &    r2   rF  TarFile.next
  se   
 	D'  A#DH ;;$,,++--{{aLLdkkAo.<<$$Q'' 899 ,,2248< ;;;##G,   DLM " $$$IIat{{A.>!>?KK9,K % & 6$$$IIat{{A.>!>?KK9,K[[A%#CF+5 &# <;;!##L1t; $' 6;;!##CF+5 $( 2A'T1 !!ZZ00',qc(:;E" Gs   D% %L 0AFL L AH$8&H$$L 1L L L &JL L J++L 8L :0K**K88K;;L c                   V P                  4       pR pVe    VP                  V4      pVRV pV'       d    \        P                  P                  V4      p\        V4       Fr  pV'       d    VP                  VP                  8X  d   R pK*  V'       d+   \        P                  P                  VP                  4      pMVP                  pW8X  g   Kp  Vu # 	  V'       d   \        V4      hR#   \         d    Rp Li ; i)FNT)	r  indexr*   r   r   r  reversedr'  r   )	r   r   r\  	normalizer  skippingr  r  member_names	   &&&&     r2   r  TarFile._getmemberA  s    
 //# *g. "&5/77##D)Dw'F>>V]]2$H gg..v{{;$kk" ( W%% 1      s   C+ +C;:C;c                d    V P                   '       g   V P                  4       e   K  RV n        R # R # NT)r  rF  r  r   s   &r2   r  TarFile._loadi  s(     {{{))+)DL r4   c                    V P                   '       d'   \        R V P                  P                  ,          4      hVe0   V P                  V9  d   \        RV P                  ,          4      hR# R# )z%s is closedNzbad operation for mode %r)r   r   r]  ry   r   )r   r   s   &&r2   r  TarFile._checkr  sU     ;;;.4>>+B+BBCC		 55		ABB !6r4   c                B   VP                  4       '       dR   R P                  \        R\        P                  P                  VP                  4      VP                  34      4      pRpMVP                  pTpV P                  W#RR7      pVf   \        RV,          4      hV# )r  NT)r\  r  zlinkname %r not found)
r  r  r+  r   r   r  r   r  r  r  )r   r\  r  limitr  s   &&   r2   rr  TarFile._find_link_target{  s     ==??xxtbggoogll.KWM]M]-^ _`HE ''HEDI>2X=>>r4   c              #    "   V P                   '       d   V P                   R j  xL
  R # ^ pV P                  e   V P                  4       pV^,          pVx   V\	        V P                  4      8  d   V P                  V,          pM6V P                   '       g#   V P                  4       pV'       g
   RV n         R # MR # V^,          pVx  Kt   L5ir  )r  r  r  rF  r,   )r   r  r\  s   &  r2   __iter__TarFile.__iter__  s      <<<||##  'iikGQJEMs4<<((,,u-\\\))+#'DL  QJEM3 $s   "CCA3CC1Cc                `    WP                   8:  d   \        V\        P                  R 7       R# R# )fileN)r  rt   rr   stderr)r   r  msgs   &&&r2   r.  TarFile._dbg  s!     JJ#CJJ' r4   c                &    V P                  4        V # r   )r  r   s   &r2   	__enter__TarFile.__enter__  s    r4   c                    Vf   V P                  4        R # V P                  '       g   V P                  P                  4        RV n        R # r  )r   r   r   r   )r   r  r  	tracebacks   &&&&r2   __exit__TarFile.__exit__  s5    <JJL ###""$DKr4   )r   r  r  r  r  r   r  r  r  r0   r  r1   r   r  rQ   r  r  r  r   r   r'  r  r  r\  )Nr   NNNNNNr  NNNNF)r   N)r   N	   )r   NN)r   NNNN)NNNr5  r  r   ).N)r   T)TF)NF)Cry   rz   r{   r|   r  r  r  r  r  rQ   r  r0   r1   r   r\  rV  rp  r8  r   r  r  r   r  r  r  r  r  r  r   r  r  r  r  r_  r1  r/  r<  rV  rK  r]  rG  rH  rQ  r`  rq  re  ry  rx  r}  rz  r{  r  r|  rN  rP  rO  rF  r  r  r  rr  r  r.  r  r  r}   r   r   s   @r2   r   r     s     EK L J FHFGJff #tZ j/ j/X 2 2  @  6  6    H 	yxyxyI%*	?hT)D )V1" 1"f%8G$C/% C/C/J)G GG($<+(,
C@10@D10(,10pN B?A$J0Bd DD?L>F&&P C&>( r4   c                      \        V R 4      '       d/   V P                  4       p\        V R7      pV P                  V4       M\        V 4      pVP	                  4        R#   \
         d     R# i ; i)rd   )r   TF)r   r  r   r  r   r   )r   r   r  s   &  r2   
is_tarfiler    s[    
4  ))+CT"AIIcNT
A		 s   AA A.-A.c                  	   ^ RI p RpV P                  VRR7      pVP                  RRRRR	R
7       VP                  RR\        RR7       VP	                  RR7      pVP                  RRRRR7       VP                  RRRR<RR7       VP                  RRRR=RR7       VP                  RRRRR7       VP                  4       pVP                  '       d!   VP                  f   VP                  ^R 4       VP                  e   VP                  p\        V4      '       d   \        VR!4      ;_uu_ 4       pVP                  4        \        VP                  4       \        P                  R"7       RRR4       VP                   '       d   \        R#P#                  V4      4       R# R# VP                  ^R$P#                  V4      4       R# VP$                  e   VP$                  p\        V4      '       dF   \&        P                  VR%4      ;_uu_ 4       pVP%                  VP                   R&7       RRR4       R# VP                  ^R$P#                  V4      4       R# VP                  EeK   \)        VP                  4      ^8X  d%   VP                  ^ ,          p\*        P,                  pMI\)        VP                  4      ^8X  d   VP                  w  rXM VP                  ^VP/                  4       4       \        X4      '       d   \&        P                  VR%4      ;_uu_ 4       pVP1                  XVP                  R'7       RRR4       VP                   '       d8   XR(8X  d   R)P#                  V4      p	MR*P#                  WX4      p	\        V	4       R# R# VP                  ^R$P#                  V4      4       R# VP2                  e   VP2                  P5                  ^ 4      p
\*        P6                  P9                  V
4      w  rR+R,R-R,R.R/R0R/R1R2R3R2R4R2R5R2R6R7R8R7/
pW9   d   R9W,          ,           MR:pVP2                  p\&        P                  W4      ;_uu_ 4       pV F  pVP;                  V4       K  	  RRR4       VP                   '       d   \        R;P#                  V
4      4       R# R# R#   + '       g   i     ELE; i  + '       g   i     R# ; i  + '       g   i     EL; i  + '       g   i     L~; i)>r<   Nz3A simple command-line interface for tarfile module.T)descriptioncolorz-vz	--verbose
store_trueFzVerbose output)actiondefaulthelpz--filterz<filtername>zFilter for extraction)metavarchoicesr  )requiredz-lz--list	<tarfile>zShow listing of a tarfile)r  r  z-ez	--extract+zExtract tarfile into target dir)nargsr  r  z-cz--createzCreate tarfile from sourcesz-tz--testzTest if a tarfile is validz&--filter is only valid for extraction
r   r  z{!r} is a tar archive.z{!r} is not a tar archive.
r  )r'  )r   r+  r  z{!r} file is extracted.z+{!r} file is extracted into {!r} directory.r   r   z.tgzz.xzr   z.txzz.bz2r   z.tbzz.tbz2z.tb2z.zstr   z.tzstzw:r   z{!r} file created.)r  z<output_dir>)z<name>z<file>)argparseArgumentParseradd_argumentr;  add_mutually_exclusive_group
parse_argsr+  r]  exittestr  r   r  rt   rr   r  r'  rQ   r_  r   r,   r   curdirformat_helprV  creater  r   splitextr1  )r  r  parserrP  argsrf   r   tfr  r  tar_namerb  extcompressionstar_mode	tar_files	file_names                    r2   mainr    s   GK$$D$IF
k,-  /

N .4  6 ///>E	tX{7  9	t[<=  ? 
tZs39  ; 
tX{8  : D{{{t||+A@Ayyiic??c33 cnn&SZZ8   |||.55c:;  KK9@@EF		iic??c5))R- *) KK9@@EF		!t||!,,q/CYYF!#,,KCKK6--/0c??c5))R6$++> *|||S=3::3?C2396#3F c
  KK9@@EF		 ;;??1%!!(+ 4D4DEEUEEU
  03/B4,++KK	\\(--&	y! ' . <<<&--h78 5 
!M   *)) *))D .-s0   2:R(R<SS$(R9	<S	S!	$S4	__main__)r   r   r  r   r   r   r   r	   r
   r  r  rM   r  r  r   r  r  r  r   r   r   r   r   r   r   )r   r  r!   r"   r#   r$   r  r  >   r   r  r  r  r5  )lversion
__author____credits__builtinsr   r  rr   r   rB  ra   r   r   rX   r  rer  r   r  AttributeErrorNotImplementedErrorr   r  __all__r-   r  r  r  r  r  r  r  r  r(  r  r  r	  r
  r  r  CONTTYPEr  r  r)  r  r  r;  r  rM   r  r  r@  r}  r,  rr  rS  r  rE   rs  r   r  getfilesystemencodingr3   r:   rJ   rS   r]   rb   ru   r  r   r	   r   r   r   r
   r   r   r   rG   r   r   r   objectr   r%  BufferedReaderrV  r   r   r   r   r   r   r   rJ  r  r  r  r  r;  r  compilerN  r   r   r  r  ry   rw   r4   r2   <module>r     s  > 6
H
 ' 
 	 	      	 $%8'B ? 	^
	





  



 HgGXWg#%5!	# (>+ /	.
 9
 UUU	3	3
C  77d?H((*H0&( N <* "&$ 2	y 		8 		 		x 		( 		( 		{ 		; 		[ 		 		K 	 0| |~6 @i& iX"2$$ "	( 	J J
?k ?@{ @
L L
?+ ?D D w5BH )	:
K 	 ::&89 o9f o9d]f ]F)$ ||`9D zF S`  
C  
Cs"   I$ I4 $	I10I14	J J