b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/tarfile.pyo
Size71.79 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:28
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
ñ� ]c@sdZdZdZdZdZdZdZddkZddkZddk Z ddk
Z
ddk Z ddk Z ddk
Z
ddkZddkZddkZeid jo
ed
�nyddkZddkZWnej
oeZZnXd d d
dgZdZdZedZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)d Z*d!Z+d"Z,d#Z-d$Z.d%Z/d&Z0e/Z1ee e!e"e%e&e'e#e$e(e)e*f Z2ee e'e*fZ3e(e)e*fZ4d'd(d)d*d+d,d-d.fZ5he6d/6e6d06e6d*6e7d+6e7d,6e7d)6Z8d1Z9d2Z:d3Z;d4Z<d5Z=d6Z>d7Z?d8Z@dZAd9ZBd:ZCd;ZDd<ZEd=ZFd>ZGd?ZHd&ZId%ZJeiK�ZLeLejoeiM�ZLnd@�ZNdA�ZOdB�ZPd>e1dC�ZQdD�ZRdE�ZSedF�ZTe9dGfe:dHfe;dIfe<dJfe=dKfe>dLffeBdMffeCdNffeDe?BdOfe?d feDd!ffeEdMffeFdNffeGe@BdOfe@d feGd!ffeHdMffeIdNffeJeABdPfeAdQfeJd!fff
ZUdR�ZVeiWdSjo
dT�ZXn
eiYiXZXdeZfdU��YZ[dVe[fdW��YZ\dXe[fdY��YZ]dZe[fd[��YZ^d\e[fd]��YZ_d^e[fd_��YZ`d`fda��YZadbfdc��YZbddecfde��YZddfecfdg��YZedhecfdi��YZfdjecfdk��YZgd ecfdl��YZhd ecfdm��YZidnfdo��YZjdpfdq��YZkdrekfds��YZldtekfdu��YZmdvenfdw��YZod$Zpd>Zqdxfdy��YZrdz�ZsetZueiitZtdS({s,Read from and write to tar format archives.
s$Revision: 81664 $s0.9.0s!Lars Gustäbel ([email protected])s5$Date: 2010-06-03 06:07:08 -0400 (Thu, 03 Jun 2010) $s;$Id: tarfile.py 81664 2010-06-03 10:07:08Z lars.gustaebel $s3Gustavo Niemeyer, Niels Gustäbel, Richard Townsend.iÿÿÿÿNtmacs'tarfile does not work for platform==mactTarFiletTarInfot
is_tarfiletTarErrortiisustar tustar00idi�t0t1t2t3t4t5t6t7tLtKtStxtgtXiiitpathtlinkpathtsizetmtimetuidtgidtunametgnametatimetctimei i�i`i@i iiiii�i@i iiicCs|| |t|�tS(s@Convert a python string to a null-terminated string buffer.
(tlentNUL(tstlength((s/usr/lib64/python2.6/tarfile.pytstn®scCs)|id�}|djo|S|| S(s?Convert a null-terminated string field to a python string.
Riÿÿÿÿ(tfind(R!tp((s/usr/lib64/python2.6/tarfile.pytnts³s
cCsª|dtd�joFy tt|�pdd�}Wq¦tj
otd��q¦XnJd}x@tt|�d�D](}|dK}|t||d�7}qzW|S(s/Convert a number field to a python number.
ii�Risinvalid headerli(tchrtintR&t
ValueErrort HeaderErrortxrangeRtord(R!tnti((s/usr/lib64/python2.6/tarfile.pytnti¼s 
cCsúd|jod|djnod|d|ft}nµ|tjp|d|djotd��n|djo&tidtid|��d}nd }x6t|d�D]$}t|d
@�|}|dL}q¾Wtd �|}|S( s/Convert a python number to a number field.
iiis%0*oisoverflow in number fieldRtltiÿi�(R t
GNU_FORMATR)tstructtunpacktpackR+R'(R-tdigitstformatR!R.((s/usr/lib64/python2.6/tarfile.pytitnÍs &"
&cCs¹|djo�y|i|d�SWqµtj
oqg}xW|D]O}y|i|i|d��Wq?tj
o|i|id��q?Xq?Wdi|�SXn|i||�SdS(s*Convert a unicode object to a string.
sutf-8tstricttutf8R1N(tencodetUnicodeEncodeErrortappendtjoin(R!tencodingterrorsRtc((s/usr/lib64/python2.6/tarfile.pytutsès
c Csxdttid|d �tid|dd!��}dttid|d �tid|dd!��}||fS( s¨Calculate the checksum for a member's header by summing up all
characters except for the chksum field which is treated as if
it was filled with spaces. According to the GNU tar sources,
some tars (Sun and NeXT) calculate chksum with signed char,
which will be different if there are chars in the buffer with
the high bit set. So we calculate two checksums, unsigned and
signed.
it148Bi�t356Bi�it148bt356b(tsumR3R4(tbuftunsigned_chksumt
signed_chksum((s/usr/lib64/python2.6/tarfile.pyt calc_chksumsüs 77cCsù|djodS|djoti||�dSd}t||�\}}xSt|�D]E}|i|�}t|�|jotd��n|i|�q\W|djoC|i|�}t|�|jotd��n|i|�ndS(sjCopy length bytes from fileobj src to fileobj dst.
If length is None, copy the entire content.
iNiisend of file reachedi@( tNonetshutilt copyfileobjtdivmodR+treadRtIOErrortwrite(tsrctdstR"tBUFSIZEtblockst remaindertbRH((s/usr/lib64/python2.6/tarfile.pyRN s&



R0t-RXtdRAR%trtwR!tttTcCskg}xUtD]M}xD|D]/\}}||@|jo|i|�PqqW|id�q
Wdi|�S(scConvert a file's mode to a string of the form
-rwxrwxrwx.
Used by TarFile.list()
RYR1(tfilemode_tableR=R>(tmodetpermttabletbittchar((s/usr/lib64/python2.6/tarfile.pytfilemode=s 
 t/cCstii|�itid�S(Rf(tosRtnormpathtreplacetsep(R((s/usr/lib64/python2.6/tarfile.pyt<lambda>MscBseZdZRS(sBase exception.(t__name__t
__module__t__doc__(((s/usr/lib64/python2.6/tarfile.pyRQst ExtractErrorcBseZdZRS(s%General exception for extract errors.(RlRmRn(((s/usr/lib64/python2.6/tarfile.pyRoTst ReadErrorcBseZdZRS(s%Exception for unreadble tar archives.(RlRmRn(((s/usr/lib64/python2.6/tarfile.pyRpWstCompressionErrorcBseZdZRS(s.Exception for unavailable compression methods.(RlRmRn(((s/usr/lib64/python2.6/tarfile.pyRqZst StreamErrorcBseZdZRS(s=Exception for unsupported operations on stream-like TarFiles.(RlRmRn(((s/usr/lib64/python2.6/tarfile.pyRr]sR*cBseZdZRS(sException for invalid headers.(RlRmRn(((s/usr/lib64/python2.6/tarfile.pyR*`st
_LowLevelFilecBs2eZdZd�Zd�Zd�Zd�ZRS(s�Low-level file object. Supports reading and writing.
It is used instead of a regular file object for streaming
access.
cCsihtid6titiBtiBd6|}ttd�o|tiO}nti||d�|_dS(NR[R\tO_BINARYi¶( RgtO_RDONLYtO_WRONLYtO_CREATtO_TRUNCthasattrRttopentfd(tselftnameR`((s/usr/lib64/python2.6/tarfile.pyt__init__ms
cCsti|i�dS(N(RgtcloseR{(R|((s/usr/lib64/python2.6/tarfile.pyRvscCsti|i|�S(N(RgRPR{(R|R((s/usr/lib64/python2.6/tarfile.pyRPyscCsti|i|�dS(N(RgRRR{(R|R!((s/usr/lib64/python2.6/tarfile.pyRR|s(RlRmRnR~RRPRR(((s/usr/lib64/python2.6/tarfile.pyRsgs
  t_StreamcBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d d
�Z dd �Z
d �Zd
�ZRS(s�Class that serves as an adapter between TarFile and
a stream-like object. The stream-like object only
needs to have a read() or write() method and is accessed
blockwise. Use of gzip or bzip2 compression is possible.
A stream-like object could be for example: sys.stdin,
sys.stdout, a socket, a tape device etc.

_Stream is intended to be used only internally.
c
Cs°t|_|djot||�}t|_n|djot|�}|i�}n|pd|_||_||_ ||_
||_ d|_ d|_
t|_|djozyddk}Wntj
otd��nX||_|id�d@|_|d jo|i�q1|i�n|d
jonyddk}Wntj
otd ��nX|d jod|_|i�|_q¬|i�|_ndS( s$Construct a _Stream object.
t*R1ltgziÿÿÿÿNszlib module is not availablelÿÿR[tbz2sbz2 module is not available(tTruet _extfileobjRLRstFalset _StreamProxyt getcomptypeR}R`tcomptypetfileobjtbufsizeRHtpostclosedtzlibt ImportErrorRqtcrc32tcrct
_init_read_gzt_init_write_gzR�tdbuftBZ2Decompressortcmpt
BZ2Compressor(R|R}R`R�R�R�R�R�((s/usr/lib64/python2.6/tarfile.pyR~�sD 


        
 


 cCs-t|d�o|i o|i�ndS(NR�(RyR�R(R|((s/usr/lib64/python2.6/tarfile.pyt__del__¸scCs¢|iid|ii|ii |iid�|_tidtt i ���}|i
d|�|i i d�o|i d |_ n|i
|i t
�dS(s6Initialize for writing with gzip compression.
i is<Ls�%sÿs.gziýÿÿÿN(R�t compressobjtDEFLATEDt MAX_WBITSt
DEF_MEM_LEVELR�R3R5tlongttimet_Stream__writeR}tendswithR (R|t timestamp((s/usr/lib64/python2.6/tarfile.pyR�¼s
  cCs|idjo#|ii||i�d@|_n|it|�7_|idjo|ii|�}n|i|�dS(s&Write string s to the stream.
R�lÿÿttarN( R�R�R�R�R�RR�tcompressR�(R|R!((s/usr/lib64/python2.6/tarfile.pyRRÉs #cCsa|i|7_xKt|i�|ijo1|ii|i|i �|i|i|_qWdS(s]Write string s to the stream if a whole new block
is ready to be written.
N(RHRR�R�RR(R|R!((s/usr/lib64/python2.6/tarfile.pyt__writeÓs
cCs|iodS|idjo,|idjo|i|ii�7_n|idjo�|ioz|ii|i�d|_|idjoJ|iiti d|i
d@��|iiti d|i d@��qßn|i p|ii
�nt|_dS(s[Close the _Stream object. No operation should be
done on it afterwards.
NR\R¢R1R�s<Llÿÿ(R�R`R�RHR�tflushR�RRR3R5R�R�R�RR�(R|((s/usr/lib64/python2.6/tarfile.pyRÜs
  #+
cCs�|ii|ii �|_d|_|id�djotd��n|id�djotd��nt|id��}|id�|d @o=t|id��d
t|id��}|i |�n|d @o<x9t
o-|id�}| p
|t joPqéqéWn|d @o<x9t
o-|id�}| p
|t joPq0q0Wn|d@o|id�nd
S(s:Initialize for reading a gzip compressed fileobj.
R1is�snot a gzip fileissunsupported compression methodiiiiiN( R�t
decompressobjR�R�R�t
_Stream__readRpRqR,RPR�R (R|tflagtxlenR!((s/usr/lib64/python2.6/tarfile.pyR�øs2 
 ,   cCs|iS(s3Return the stream's file pointer position.
(R�(R|((s/usr/lib64/python2.6/tarfile.pyttellsicCs~||idjoWt||i|i�\}}x$t|�D]}|i|i�q@W|i|�n
td��|iS(sXSet the stream's file pointer to pos. Negative seeking
is forbidden.
is seeking backwards is not allowed(R�ROR�R+RPRr(R|R�RVRWR.((s/usr/lib64/python2.6/tarfile.pytseeks
 cCs�|djoSg}x7to/|i|i�}|pPn|i|�qWdi|�}n|i|�}|it|�7_|S(s�Return the next size number of bytes from the stream.
If size is not defined, return all bytes of the stream
up to EOF.
R1N(RLR�t_readR�R=R>R�R(R|RR]RH((s/usr/lib64/python2.6/tarfile.pyRP)s
cCså|idjo|i|�St|i�}|ig}x�||jow|i|i�}|pPny|ii|�}Wntj
otd��nX|i |�|t|�7}q<Wdi
|�}|||_|| S(s+Return size bytes from the stream.
R¢sinvalid compressed dataR1( R�R§RR�R�R�t
decompressRQRpR=R>(R|RRAR]RH((s/usr/lib64/python2.6/tarfile.pyR¬;s$ 


cCs�t|i�}|ig}xP||joB|ii|i�}|pPn|i|�|t|�7}qWdi|�}|||_|| S(ssReturn size bytes from stream. If internal buffer is empty,
read another block from the stream.
R1(RRHR�RPR�R=R>(R|RRAR]RH((s/usr/lib64/python2.6/tarfile.pyt__readQs 


N(RlRmRnR~R�R�RRR�RR�RªR«RLRPR¬R§(((s/usr/lib64/python2.6/tarfile.pyR�s  . 

  
 R�cBs2eZdZd�Zd�Zd�Zd�ZRS(ssSmall proxy class that enables transparent compression
detection for the Stream interface (mode 'r|*').
cCs"||_|iit�|_dS(N(R�RPt BLOCKSIZERH(R|R�((s/usr/lib64/python2.6/tarfile.pyR~gs cCs|ii|_|iS(N(R�RPRH(R|R((s/usr/lib64/python2.6/tarfile.pyRPkscCs4|iid�odS|iid�odSdS(Ns�R�tBZh91R�R¢(RHt
startswith(R|((s/usr/lib64/python2.6/tarfile.pyR�os
cCs|ii�dS(N(R�R(R|((s/usr/lib64/python2.6/tarfile.pyRvs(RlRmRnR~RPR�R(((s/usr/lib64/python2.6/tarfile.pyR�bs
   t _BZ2ProxycBsSeZdZd
Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z
RS( sSmall proxy class that enables external file object
support for "r:bz2" and "w:bz2" modes. This is actually
a workaround for a limitation in bz2 module's BZ2File
class which (unlike gzip.GzipFile) has no support for
a file object argument.
iicCs8||_||_t|idd�|_|i�dS(NR}(R�R`tgetattrRLR}tinit(R|R�R`((s/usr/lib64/python2.6/tarfile.pyR~�s  cCsdddk}d|_|idjo,|i�|_|iid�d|_n|i�|_dS(NiÿÿÿÿiR[R1( R�R�R`R�tbz2objR�R«RHR�(R|R�((s/usr/lib64/python2.6/tarfile.pyR´�s  
cCsã|ig}t|i�}x}||joo|ii|i�}|pPny|ii|�}Wntj
oPnX|i|�|t|�7}qWdi |�|_|i| }|i||_|i
t|�7_
|S(NR1( RHRR�RPt blocksizeRµR­tEOFErrorR=R>R�(R|RRXRtrawtdataRH((s/usr/lib64/python2.6/tarfile.pyRP�s$ 


cCs6||ijo|i�n|i||i�dS(N(R�R´RP(R|R�((s/usr/lib64/python2.6/tarfile.pyR«¨scCs|iS(N(R�(R|((s/usr/lib64/python2.6/tarfile.pyRª­scCs;|it|�7_|ii|�}|ii|�dS(N(R�RRµR£R�RR(R|R¹R¸((s/usr/lib64/python2.6/tarfile.pyRR°scCs7|idjo#|ii�}|ii|�ndS(NR\(R`RµR¥R�RR(R|R¸((s/usr/lib64/python2.6/tarfile.pyRµsi@( RlRmRnR¶R~R´RPR«RªRRR(((s/usr/lib64/python2.6/tarfile.pyR²zs 
   t _FileInFilecBsSeZdZdd�Zd�Zd�Zdd�Zd�Zd�Z d�Z
RS( sA thin wrapper around an existing file object that
provides a part of its data as an individual file
object.
cCs1||_||_||_||_d|_dS(Ni(R�toffsetRtsparsetposition(R|R�R»RR¼((s/usr/lib64/python2.6/tarfile.pyR~Äs
    cCs|iS(s*Return the current file position.
(R½(R|((s/usr/lib64/python2.6/tarfile.pyRªËscCs
||_dS(s(Seek to a position in the file.
N(R½(R|R½((s/usr/lib64/python2.6/tarfile.pyR«ÐscCsi|djo|i|i}nt||i|i�}|idjo|i|�S|i|�SdS(s!Read data from the file.
N(RLRR½tminR¼t
readnormalt
readsparse(R|R((s/usr/lib64/python2.6/tarfile.pyRPÕs 
cCs9|ii|i|i�|i|7_|ii|�S(s*Read operation for regular files.
(R�R«R»R½RP(R|R((s/usr/lib64/python2.6/tarfile.pyR¿âscCs`g}xJ|djo<|i|�}|pPn|t|�8}|i|�q Wdi|�S(s)Read operation for sparse files.
iR1(treadsparsesectionRR=R>(R|RR¹RH((s/usr/lib64/python2.6/tarfile.pyRÀés
cCsÀ|ii|i�}|djodSt||i|i|i�}t|t�oN|i |i|i}|i
i |i|�|i|7_|i
i |�S|i|7_t
|SdS(s0Read a single section of a sparse file.
R1N(R¼R$R½RLR¾R»Rt
isinstancet_datatrealposR�R«RPR (R|RtsectionRÄ((s/usr/lib64/python2.6/tarfile.pyRÁõs
 N( RlRmRnRLR~RªR«RPR¿RÀRÁ(((s/usr/lib64/python2.6/tarfile.pyRº¾s   
 t ExFileObjectcBsheZdZdZd�Zd d�Zdd�Zd�Zd�Z e
i d�Z d �Z
d
�ZRS( saFile-like object for reading an archive member.
Is returned by TarFile.extractfile().
icCsmt|i|i|it|dd��|_|i|_d|_t|_ |i|_d|_
d|_ dS(NR¼R[iR1( RºR�t offset_dataRR³RLR}R`R�R�R½tbuffer(R|ttarfilettarinfo((s/usr/lib64/python2.6/tarfile.pyR~s      cCsË|iotd��nd}|ioD|djo|i}d|_qn|i| }|i||_n|djo||ii�7}n!||ii|t|��7}|it|�7_|S(s~Read at most size bytes from the file. If size is not
present or None, read all data until EOF is reached.
sI/O operation on closed fileR1N(R�R)RÈRLR�RPRR½(R|RRH((s/usr/lib64/python2.6/tarfile.pyRPs


 


 iÿÿÿÿcCs9|iotd��nd|ijo|iid�d}n |ig}x�to�|ii|i�}|i|�| p
d|joMdi |�|_|iid�d}|djot
|i�}nPqSqSW|djot ||�}n|i| }|i||_|i t
|�7_ |S(s°Read one entire line from the file. If size is present
and non-negative, return a string with at most that
size, which may be an incomplete line.
sI/O operation on closed files
iR1iiÿÿÿÿ(
R�R)RÈR$R�R�RPR¶R=R>RR¾R½(R|RR�tbuffersRH((s/usr/lib64/python2.6/tarfile.pytreadline5s*
 




cCs>g}x1to)|i�}|pPn|i|�q W|S(s0Return a list with all remaining lines.
(R�RÌR=(R|tresulttline((s/usr/lib64/python2.6/tarfile.pyt readlinesTs cCs!|iotd��n|iS(s*Return the current file position.
sI/O operation on closed file(R�R)R½(R|((s/usr/lib64/python2.6/tarfile.pyRª^s
cCs |iotd��n|tijo"tt|d�|i�|_n |tijoJ|djot|i|d�|_qët|i||i�|_nF|ti jo)tt|i||i�d�|_n
td��d|_
|i i |i�dS(s(Seek to a position in the file.
sI/O operation on closed fileisInvalid argumentR1N(
R�R)RgtSEEK_SETR¾tmaxRR½tSEEK_CURtSEEK_ENDRÈR�R«(R|R�twhence((s/usr/lib64/python2.6/tarfile.pyR«fs
"
 )  cCs
t|_dS(sClose the file object.
N(R�R�(R|((s/usr/lib64/python2.6/tarfile.pyR{sccs0x)to!|i�}|pPn|VqWdS(s/Get an iterator over the file's lines.
N(R�RÌ(R|RÎ((s/usr/lib64/python2.6/tarfile.pyt__iter__�s  N(RlRmRnR¶R~RLRPRÌRÏRªRgRÐR«RRÕ(((s/usr/lib64/python2.6/tarfile.pyRÆ
s
 
 cBs©eZdZdd�Zd�Zd�Zeee�Zd�Zd�Z eee �Z
d�Z d�Z e
ed d
�Zd �Zd �Zd
�Zed��Zd�Zed��Zed��Zed��Zeed��Zed��Zed��Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd �Z(d!�Z)d"�Z*d#�Z+d$�Z,d%�Z-d&�Z.RS('sInformational class which holds the details about an
archive member given by a tar header block.
TarInfo objects are returned by TarFile.getmember(),
TarFile.getmembers() and TarFile.gettarinfo() and are
usually created internally.
R1cCs�||_d|_d|_d|_d|_d|_d|_t|_d|_ d|_
d|_ d|_ d|_
d|_d|_h|_dS(sXConstruct a TarInfo object. name is the optional name
of the member.
i¤iR1trootN(R}R`RRRRtchksumtREGTYPEttypetlinknameRRtdevmajortdevminorR»RÇt pax_headers(R|R}((s/usr/lib64/python2.6/tarfile.pyR~�s                cCs|iS(N(R}(R|((s/usr/lib64/python2.6/tarfile.pyt_getpath®scCs
||_dS(N(R}(R|R}((s/usr/lib64/python2.6/tarfile.pyt_setpath°scCs|iS(N(RÚ(R|((s/usr/lib64/python2.6/tarfile.pyt _getlinkpath´scCs
||_dS(N(RÚ(R|RÚ((s/usr/lib64/python2.6/tarfile.pyt _setlinkpath¶scCs d|ii|it|�fS(Ns<%s %r at %#x>(t __class__RlR}tid(R|((s/usr/lib64/python2.6/tarfile.pyt__repr__ºscCs-h
t|i�d6|id@d6|id6|id6|id6|id6|id6|id 6|i ot|i �nd
d 6|i
d 6|i d
6|i d6|i
d6}|d tjo)|did� o|dcd7<nxCdD];}t||�tjo||i||�||<qêqêW|S(s9Return the TarInfo's attributes as a dictionary.
R}iÿR`RRRRR×RÙR1RÚRRRÛRÜRf(snameslinknamesunamesgname(RhR}R`RRRRR×RÙRÚRRRÛRÜtDIRTYPER tunicodeR;(R|R?R@tinfotkey((s/usr/lib64/python2.6/tarfile.pytget_info½s*





!



&"R9cCsy|i||�}|tjo|i|�S|tjo|i|�S|tjo|i|||�Std��dS(s<Return a tar header as a string of 512 byte blocks.
sinvalid formatN(Rét USTAR_FORMATtcreate_ustar_headerR2tcreate_gnu_headert
PAX_FORMATtcreate_pax_headerR)(R|R7R?R@Rç((s/usr/lib64/python2.6/tarfile.pyttobufÙs


cCs}t|d<t|d�tjotd��nt|d�tjo%|i|d�\|d<|d<n|i|t�S(s3Return the object as a ustar header block.
tmagicRÚslinkname is too longR}tprefix(t POSIX_MAGICRt LENGTH_LINKR)t LENGTH_NAMEt_posix_split_namet_create_headerRê(R|Rç((s/usr/lib64/python2.6/tarfile.pyRëçs 
%cCs�t|d<d}t|d�tjo||i|dt�7}nt|d�tjo||i|dt�7}n||i|t�S(s:Return the object as a GNU header block sequence.
RðR1RÚR}( t GNU_MAGICRRót_create_gnu_long_headertGNUTYPE_LONGLINKRôtGNUTYPE_LONGNAMERöR2(R|RçRH((s/usr/lib64/python2.6/tarfile.pyRìôs
c Cs¨t|d<|ii�}x¸ddtfddtfddfD]�\}}}||joq>n||i||�}y|id �Wn tj
o|||<q>nXt||�|jo|||<q>q>Wx�ddddfD]�\}} ||jod||<qçn||}d|jod | djn pt |t
�ot |�||<d||<qçqçW|o|i |�}
nd}
|
|i
|t�S(s³Return the object as a ustar header block. If it cannot be
represented this way, prepend a pax extended header sequence
with supplement information.
RðR}RRÚRRi RtasciiRiRRi RiiR1(sunamesunamei (sgnamesgnamei (suidi(sgidi(ssizei (smtimei (RòRÝtcopyRôRótdecodeR;R<RRÂtfloatRæt_create_pax_generic_headerRöRê( R|RçR?R@RÝR}thnameR"tvalR6RH((s/usr/lib64/python2.6/tarfile.pyRîs:



 


7cCs|i|dt�S(sAReturn the object as a pax global header block sequence.
RÙ(RÿtXGLTYPE(tclsRÝ((s/usr/lib64/python2.6/tarfile.pytcreate_pax_global_header5scCs�|td }x'|o|ddjo|d }qW|t|�}|d }| pt|�tjotd��n||fS(sUSplit a name longer than 100 chars into a prefix
and a name part.
iiÿÿÿÿRfsname is too long(t
LENGTH_PREFIXRRôR)(R|R}Rñ((s/usr/lib64/python2.6/tarfile.pyRõ;s
cCs»t|idd�d�t|idd�d@d|�t|idd�d|�t|id d�d|�t|id
d�d |�t|id d�d |�d
|idt�t|idd�d�t|idt�d�t|idd�d�t|idd�d�t|idd�d|�t|idd�d|�t|idd�d�g}tidtdi|��}t |t �d}|d d||d}|S(s�Return a header block. info is a dictionary with file
information, format must be one of the *_FORMAT constants.
R}R1idR`iiÿiRRRi Rs RÙRÚRðRRÖi RRÛRÜRñi�s%dsi�þÿÿs%06oi�þÿÿ(
R#tgetR8RØRòR3R5R¯R>RK(RçR7tpartsRHR×((s/usr/lib64/python2.6/tarfile.pyRöJs&cCsBtt|�t�\}}|djo|t|t7}n|S(sdReturn the string payload filled with zero bytes
up to the next 512 byte border.
i(RORR¯R (tpayloadRVRW((s/usr/lib64/python2.6/tarfile.pyt_create_payloadfs
cCs[|t7}h}d|d<||d<t|�|d<t|d<|i|t�|i|�S(sTReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
for name.
s
././@LongLinkR}RÙRRð(R RR÷RöRêR (RR}RÙRç((s/usr/lib64/python2.6/tarfile.pyRøps



c
Csg}x³|i�D]¥\}}|id�}|id�}t|�t|�d}d}}x:to2|tt|��}||joPn|}qdW|id|||f�qWdi|�}h} d| d<|| d<t|�| d <t| d
<|i| t �|i
|�S( s©Return a POSIX.1-2001 extended or global header sequence
that contains a list of keyword, value pairs. The values
must be unicode objects.
R:iis %d %s=%s
R1s././@PaxHeaderR}RÙRRð( t iteritemsR;RR�tstrR=R>RòRöRêR (
RRÝRÙtrecordstkeywordtvalueR0R-R%Rç((s/usr/lib64/python2.6/tarfile.pyRÿ�s,


 


cCs8t|�tjotd��n|it�tjotd��nt|dd!�}|t|�jotd��n|�}||_t|dd!�|_ t|dd!�|_
t|dd !�|_ t|d d
!�|_ t|d
d !�|_
t|d d!�|_||_|dd !|_t|d d
!�|_t|dd!�|_t|dd!�|_t|dd!�|_t|dd!�|_t|dd!�}|itjo |i id�o
t|_n|i�o|i id�|_ n|o(|itjo|d|i |_ n|S(sBConstruct a TarInfo object from a 512 byte string buffer.
struncated headers empty headeri�i�s bad checksumiidiliti|i�i�ii i)iIiQiYiôRf(RR¯R*tcountR R/RKRHR&R}R`RRRRR×RÙRÚRRRÛRÜtAREGTYPER Råtisdirtrstript GNU_TYPES(RRHR×tobjRñ((s/usr/lib64/python2.6/tarfile.pytfrombuf¡s<   #

cCsP|iit�}|pdS|i|�}|ii�t|_|i|�S(sOReturn the next TarInfo object from TarFile object
tarfile.
N(R�RPR¯RRªR»t _proc_member(RRÉRHR((s/usr/lib64/python2.6/tarfile.pyt fromtarfileÍs cCsz|ittfjo|i|�S|itjo|i|�S|itttfjo|i |�S|i
|�SdS(sYChoose the right processing method depending on
the type and call it.
N( RÙRúRùt
_proc_gnulongtGNUTYPE_SPARSEt _proc_sparsetXHDTYPERtSOLARIS_XHDTYPEt _proc_paxt
_proc_builtin(R|RÉ((s/usr/lib64/python2.6/tarfile.pyRäscCs{|ii�|_|i}|i�p|itjo||i|i�7}n||_|i |i
|i |i �|S(sfProcess a builtin type or an unknown type which
will be treated as a regular file.
(
R�RªRÇtisregRÙtSUPPORTED_TYPESt_blockRR»t_apply_pax_infoRÝR?R@(R|RÉR»((s/usr/lib64/python2.6/tarfile.pyRñs  cCs |ii|i|i��}|i|�}|djotd��n|i|_|it jot
|�|_ n$|it jot
|�|_
n|S(sSProcess the blocks that hold a GNU longname
or longlink member.
smissing subsequent headerN(R�RPR!RRRLR*R»RÙRúR&R}RùRÚ(R|RÉRHtnext((s/usr/lib64/python2.6/tarfile.pyRs
 c Cs|i}t�}d}d}d}xÃtd�D]µ}y6t|||d!�}t||d|d!�} Wntj
oPnX||jo|it|||��n|it|| |��|| 7}|| }|d7}q1Wt|d�}
t|dd!�} x|
d joò|i i
t �}d
}xÃtd �D]µ}y6t|||d!�}t||d|d!�} Wntj
oPnX||jo|it|||��n|it|| |��|| 7}|| }|d7}qBWt|d �}
qW|| jo|it|| |��n||_ |i i
�|_|i|i|i�|_| |_|S(
s8Process a GNU sparse header plus extra headers.
i�lii iiâiãiïiiiiø(RHt _ringbufferR+R/R)R=t_holeRÃR,R�RPR¯R¼RªRÇR!RR»( R|RÉRHtspR�tlastposRÄR.R»tnumbytest
isextendedtorigsize((s/usr/lib64/python2.6/tarfile.pyRsZ  









  c CsÖ|ii|i|i��}|itjo
|i}n|ii�}ti dti
�}d}x¥t o�|i ||�}|pPn|i
�\}}t|�}||id�d|id�|d!} |id�}| id�} | ||<||7}qhW|i|�}
|ittfjo |
djotd��n|
i||i|i�|i|
_d|joM|
i} |
i�p|
itjo| |
i|
i�7} n| |_qÒn|
S( sVProcess an extended or global header as described in
POSIX.1-2001.
s(\d+) ([^=]+)=iiiR:smissing subsequent headerRN(R�RPR!RRÙRRÝRütretcompiletUR�tmatchtgroupsR(tendtstartRýRRRRLR*R"R?R@R»RÇRR ( R|RÉRHRÝtregexR�R.R"R
RR#R»((s/usr/lib64/python2.6/tarfile.pyROs<
 +

 
 cCsÇx±|i�D]£\}}|tjoq
n|djo|id�}n|tjo4yt||�}Wq tj
o
d}q Xnt|||�}t|||�q
W|i�|_dS(soReplace fields with supplemental information from a previous
pax extended or global header.
RRfiN( R
t
PAX_FIELDSRtPAX_NUMBER_FIELDSR)RBtsetattrRüRÝ(R|RÝR?R@R
R((s/usr/lib64/python2.6/tarfile.pyR"�s



cCs2t|t�\}}|o|d7}n|tS(s_Round up a byte count by BLOCKSIZE and return it,
e.g. _block(834) => 1024.
i(ROR¯(R|RRVRW((s/usr/lib64/python2.6/tarfile.pyR! scCs
|itjS(N(RÙt
REGULAR_TYPES(R|((s/usr/lib64/python2.6/tarfile.pyR©scCs
|i�S(N(R(R|((s/usr/lib64/python2.6/tarfile.pytisfile«scCs
|itjS(N(RÙRå(R|((s/usr/lib64/python2.6/tarfile.pyR­scCs
|itjS(N(RÙtSYMTYPE(R|((s/usr/lib64/python2.6/tarfile.pytissym¯scCs
|itjS(N(RÙtLNKTYPE(R|((s/usr/lib64/python2.6/tarfile.pytislnk±scCs
|itjS(N(RÙtCHRTYPE(R|((s/usr/lib64/python2.6/tarfile.pytischr³scCs
|itjS(N(RÙtBLKTYPE(R|((s/usr/lib64/python2.6/tarfile.pytisblkµscCs
|itjS(N(RÙtFIFOTYPE(R|((s/usr/lib64/python2.6/tarfile.pytisfifo·scCs
|itjS(N(RÙR(R|((s/usr/lib64/python2.6/tarfile.pytissparse¹scCs|itttfjS(N(RÙR<R>R@(R|((s/usr/lib64/python2.6/tarfile.pytisdev»s(/RlRmRnR~RÞRßtpropertyRRàRáRRäRétDEFAULT_FORMATtENCODINGRïRëRìRît classmethodRRõt staticmethodRöR RøRRÿRRRRRRRR"R!RR7RR9R;R=R?RARBRC(((s/usr/lib64/python2.6/tarfile.pyR�sP       
 3 
,
  8 :          c
Bs'eZdZdZeZeZdZeZ e
Z d.Z
eZeZd.dd.d.d.d.d.d.d.d.d.d.d� Zd�Zd�Zeee�Zed.dd.ed��Zedd.d��Zedd.dd ��Zedd.dd
��Zhd d 6d
d6dd6Zd�Zd�Zd�Z d�Z!d.d.d.d�Z"e#d�Z$d.e#d.d�Z%d.d�Z&dd.d�Z'dd�Z(d�Z)d�Z*d�Z+d �Z,d!�Z-d"�Z.d#�Z/d$�Z0d%�Z1d&�Z2d'�Z3d(�Z4d.d)�Z5d*�Z6d.d+�Z7d,�Z8d-�Z9RS(/s=The TarFile Class provides an interface to tar archives.
iR[c
CsÒt|�djp
|djotd��n||_hdd6dd6dd 6||_|pY|idjo*tii|� od |_d|_nt||i�}t|_ nT|djot |d
�o
|i }nt |d �o|i|_nt
|_ |otii|�nd|_ ||_|dj o
||_n|dj o
||_n|dj o
||_n|dj o
||_n|dj o
||_n| dj o
| |_n$|djo
d |_n
d
|_|
dj o|itjo
|
|_n
h|_| dj o
| |_n| dj o
| |_nt|_g|_t|_|ii�|_h|_y|idjod|_ |i!�|_ n|idjo\d|_ xPt
oD|i!�djo-|idjo|ii"t# d�nPqáqáWn|idjo[t
|_|ioD|ii$|ii%��}
|ii&|
�|it|
�7_q�nWn.|i p|ii'�nt
|_�nXdS(sÖOpen an (uncompressed) tar archive `name'. `mode' is either 'r' to
read from an existing archive, 'a' to append data to an existing
file or 'w' to create a new file overwriting an existing one. `mode'
defaults to 'r'.
If `fileobj' is given, it is used for reading or writing data. If it
can be determined, `mode' is overridden by `fileobj's mode.
`fileobj' is not closed, when TarFile is closed.
iR¸smode must be 'r', 'a' or 'w'trbR[sr+btatwbR\R}R`sutf-8R9itawN((RR)R`t_modeRgRtexistst bltn_openR�R�RLRyR}R�tabspathR�R7RÊt dereferencet ignore_zerosR?R@RíRÝtdebugt
errorlevelR�tmemberst_loadedRªR»tinodest firstmemberR#R«R¯RRüRRR(R|R}R`R�R7RÊRQRRR?R@RÝRSRTRH((s/usr/lib64/python2.6/tarfile.pyR~Ùs�  "$ 


 # 













 
 



       
!
 cCs
|itjS(N(R7Rê(R|((s/usr/lib64/python2.6/tarfile.pyt _getposix;scCs@ddk}|idtd�|o
t|_n
t|_dS(Niÿÿÿÿs use the format attribute insteadi(twarningstwarntDeprecationWarningRêR7R2(R|RRZ((s/usr/lib64/python2.6/tarfile.pyt _setposix=s   
c Ks,| o| otd��n|djo­x�|iD]�}t||i|�}|dj o|i�}ny||d||�SWq7ttfj
o*} |dj o|i|�q7q7q7Xq7Wtd��nCd|jo�|idd�\}
}|
pd}
|pd}||ijot||i|�}ntd|��|||
||�Sd |jo�|id d�\}
}|
pd}
|pd}|
d
jotd ��n|||
t ||
|||�|�} t
| _ | S|d jo|i ||||�Std
��dS(s|Open a tar archive for reading, writing or appending. Return
an appropriate TarFile class.

mode:
'r' or 'r:*' open for reading with transparent compression
'r:' open for reading exclusively uncompressed
'r:gz' open for reading with gzip compression
'r:bz2' open for reading with bzip2 compression
'a' or 'a:' open for appending, creating the file if necessary
'w' or 'w:' open for writing without compression
'w:gz' open for writing with gzip compression
'w:bz2' open for writing with bzip2 compression

'r|*' open a stream of tar blocks with transparent compression
'r|' open an uncompressed stream of tar blocks for reading
'r|gz' open a gzip compressed stream of tar blocks
'r|bz2' open a bzip2 compressed stream of tar blocks
'w|' open an uncompressed stream for writing
'w|gz' open a gzip compressed stream for writing
'w|bz2' open a bzip2 compressed stream for writing
snothing to openR[sr:*s%file could not be opened successfullyt:iR¢sunknown compression type %rt|trwsmode must be 'r' or 'w'RLsundiscernible modeN(R[sr:*(
R)t OPEN_METHR³RLRªRpRqR«tsplitR�R�R�ttaropen( RR}R`R�R�tkwargsR�tfunct saved_posteReR]((s/usr/lib64/python2.6/tarfile.pyRzRsJ



 






   
cKsCt|�djp
|djotd��n|||||�S(sCOpen uncompressed tar archive name for reading or writing.
iR¸smode must be 'r', 'a' or 'w'(RR)(RR}R`R�Rd((s/usr/lib64/python2.6/tarfile.pyRc�s i cKsðt|�djp
|djotd��nyddk}|iWn%ttfj
otd��nX|djot||d�}ny.|i |||i||||�|�}Wnt
j
ot d��nXt |_
|S( skOpen gzip compressed tar archive name for reading or writing.
Appending is not allowed.
iR`smode must be 'r' or 'w'iÿÿÿÿNsgzip module is not availableRXsnot a gzip file(RR)tgziptGzipFileR�tAttributeErrorRqRLRORcRQRpR�R�(RR}R`R�t
compresslevelRdRhR]((s/usr/lib64/python2.6/tarfile.pytgzopen£s"   
 
 c Ksåt|�djp
|djotd��nyddk}Wntj
otd��nX|dj ot||�}n|i||d|�}y|i||||�}Wnt j
ot
d��nXt |_ |S( slOpen bzip2 compressed tar archive name for reading or writing.
Appending is not allowed.
iR`smode must be 'r' or 'w'.iÿÿÿÿNsbz2 module is not availableRksnot a bzip2 file(
RR)R�R�RqRLR²tBZ2FileRcRQRpR�R�(RR}R`R�RkRdR�R]((s/usr/lib64/python2.6/tarfile.pytbz2open½s 
 RcR¢RlR�RnR�cCs·|iodS|idjop|iittd�|itd7_t|it�\}}|djo|iitt|�q�n|i p|ii
�nt |_dS(slClose the TarFile. In write-mode, two finishing zero blocks are
appended to the archive.
NRLii( R�R`R�RRR R¯R»ROt
RECORDSIZER�RR�(R|RVRW((s/usr/lib64/python2.6/tarfile.pyRàs

 
cCs4|i|�}|djotd|��n|S(sReturn a TarInfo object for member `name'. If `name' can not be
found in the archive, KeyError is raised. If a member occurs more
than once in the archive, its last occurrence is assumed to be the
most up-to-date version.
sfilename %r not foundN(t
_getmemberRLtKeyError(R|R}RÊ((s/usr/lib64/python2.6/tarfile.pyt getmemberôs
cCs)|i�|ip|i�n|iS(s�Return the members of the archive as a list of TarInfo objects. The
list has the same order as the members in the archive.
(t_checkRVt_loadRU(R|((s/usr/lib64/python2.6/tarfile.pyt
getmembersÿs

cCs(g}|i�D]}||iq~S(s�Return the members of the archive as a list of their names. It has
the same order as the list returned by getmembers().
(RuR}(R|t_[1]RÊ((s/usr/lib64/python2.6/tarfile.pytgetnames sc
Cs�|id�|d
j o
|i}n|d
jo
|}nt|�}tii|�\}}x#|dd!djo|d}qeW|i�}||_|d
joAt td�o|i
oti |�}qti |�}nti
|i��}d}|i}t i|�o�|i|if} |i
oK|idjo;| |ijo+||i| jot}
|i| }qBt}
| do||i| <qBn�t i|�o
t}
n|t i|�o
t}
nbt i|�ot}
ti|�}n9t i|�o
t}
nt i |�o
t!}
nd
S||_||_"|i#|_$|i%|_&|
tjo|i'|_(n
d|_(|i)|_*|
|_+||_,t-o7yt-i.|i$�d|_/Wqît0j
oqîXnt1o7yt1i2|i&�d|_3Wq,t0j
oq,Xn|
tt!fjoRt td�o>t td �o.ti4|i5�|_6ti7|i5�|_8q�n|S( sOCreate a TarInfo object for either the file `name' or the file
object `fileobj' (using os.fstat on its file descriptor). You can
modify some of the TarInfo's attributes before you add it using
addfile(). If given, `arcname' specifies an alternative name for the
file in the archive.
RLiiRftlstatR1ltmajortminorN(9RsRLR}RhRgRt
splitdriveRÊRÉRyRQRxtstattfstattfilenotst_modetS_ISREGtst_inotst_devtst_nlinkRWR:RØtS_ISDIRRåtS_ISFIFOR@tS_ISLNKR8treadlinktS_ISCHRR<tS_ISBLKR>R`tst_uidRtst_gidRtst_sizeRtst_mtimeRRÙRÚtpwdtgetpwuidRRqtgrptgetgrgidRRytst_rdevRÛRzRÜ( R|R}tarcnameR�tdrvRÊtstatresRÚtstmdtinodeRÙ((s/usr/lib64/python2.6/tarfile.pyt
gettarinfos�




   
 $ 



    
       cCs|i�x
|D]}|o�t|i�Gd|ip|i|ip|ifG|i�p
|i�odd|i |i
fGn d|i Gdt i
|i�d Gn|i|i�odndG|o<|i�od G|iGn|i�od
G|iGqnHqWd S( s¼Print a table of contents to sys.stdout. If `verbose' is False, only
the names of the members are printed. If it is True, an `ls -l'-like
output is produced.
s%s/%ss%10ss%d,%ds%10ds%d-%02d-%02d %02d:%02d:%02diRfR1s->slink toN(RsReR`RRRRR=R?RÛRÜRR�t localtimeRR}RR9RÚR;(R|tverboseRÊ((s/usr/lib64/python2.6/tarfile.pytlistrs(

 

cCs|id�|djo
|}n|dj o&||�o|idd|�dS|idj o5tii|�|ijo|idd|�dS|djof|oZ|djo
d}nx@ti|�D]+}|i|tii ||�||�q×WndS|id|�|i
||�}|djo|idd |�dS|i �o-t |d
�}|i
||�|i�n�|i�oj|i
|�|oRxOti|�D]:}|itii ||�tii ||�||�qÂWqn|i
|�dS( s®Add the file `name' to the archive. `name' may be any type of file
(directory, fifo, symbolic link, etc.). If given, `arcname'
specifies an alternative name for the file in the archive.
Directories are added recursively by default. This can be avoided by
setting `recursive' to False. `exclude' is a function that should
return True for each filename to be excluded.
RListarfile: Excluded %rNstarfile: Skipped %rt.R1istarfile: Unsupported type %rRI(RsRLt_dbgR}RgRRPtlistdirtaddR>R�RROtaddfileRR(R|R}R�t recursivetexcludetfRÊ((s/usr/lib64/python2.6/tarfile.pyR��sB


,


-



@cCsø|id�ti|�}|i|i|i|i�}|ii|�|it |�7_|dj oxt ||i|i �t
|i t�\}}|djo&|iitt|�|d7}n|i|t7_n|ii|�dS(s]Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
given, tarinfo.size bytes are read from it and added to the archive.
You can create TarInfo objects using gettarinfo().
On Windows platforms, `fileobj' should always be opened with mode
'rb' to avoid irritation about the file size.
RLiiN(RsRüRïR7R?R@R�RRR»RRLRNRROR¯R RUR=(R|RÊR�RHRVRW((s/usr/lib64/python2.6/tarfile.pyR Ès


R�c Cs;g}|djo
|}nxT|D]L}|i�o)|i|�ti|�}d|_n|i||�q$W|idtid��|i �x�|D]�}t
i i ||i
�}y4|i||�|i||�|i||�Wq�tj
o4}|idjo�q3|idd|�q�Xq�WdS(sMExtract all members from the archive to the current working
directory and set owner, modification time and permissions on
directories afterwards. `path' specifies a different directory
to extract to. `members' is optional and must be a subset of the
list returned by getmembers().
iÀRèR}is tarfile: %sN(RLRR=RüR`textracttsorttoperatort
attrgettertreverseRgRR>R}tchowntutimetchmodRoRTR�(R|RRUt directoriesRÊtdirpathRg((s/usr/lib64/python2.6/tarfile.pyt
extractallâs.





R1cCsE|id�t|t�o|i|�}n|}|i�otii||i�|_ ny&|i
|tii||i ��Wn¶t j
ok}|i
djo�qA|idjo|idd|i�qA|idd|i|if�nAtj
o4}|i
djo�qA|idd|�nXdS(s#Extract a member from the archive to the current working directory,
using its full name. Its file information is extracted as accurately
as possible. `member' may be a filename or a TarInfo object. You can
specify a different directory using `path'.
R[iis tarfile: %sstarfile: %s %rN(RsRÂt
basestringRrR;RgRR>RÚt _link_targett_extract_memberR}tEnvironmentErrorRTtfilenameRLR�tstrerrorRo(R|tmemberRRÊRg((s/usr/lib64/python2.6/tarfile.pyR¤s$

&$cCsÚ|id�t|t�o|i|�}n|}|i�o|i||�S|itjo|i||�S|i�p
|i �oCt|i
t �ot d��qÖ|i
|i|i|��SndSdS(sëExtract a member from the archive as a file object. `member' may be
a filename or a TarInfo object. If `member' is a regular file, a
file-like object is returned. If `member' is a link, a file-like
object is constructed from the link's target. If `member' is none of
the above, None is returned.
The file-like object is read-only and provides the following
methods: read(), readline(), readlines(), seek() and tell()
R[s'cannot extract (sym)link as file objectN(RsRÂR¯RrRt
fileobjectRÙR R;R9R�R�Rrt extractfileRpRÚRL(R|RµRÊ((s/usr/lib64/python2.6/tarfile.pyR·(s

cCsø|ddjo|d }ntii|�}tii|�}|o%tii|� oti|�n|i�p
|i�o$|idd|i |i
f�n|id|i �|i �o|i ||�nÓ|i
�o|i||�n²|i�o|i||�n�|i�p
|i�o|i||�nc|i�p
|i�o|i||�n5|itjo|i||�n|i ||�|i||�|i�p$|i||�|i||�ndS(s\Extract the TarInfo object tarinfo to a physical
file called targetpath.
iÿÿÿÿRfis%s -> %sN(RgRRhtdirnameRNtmakedirsR;R9R�R}RÚRtmakefileRtmakedirRAtmakefifoR=R?tmakedevtmakelinkRÙR t makeunknownR©R«Rª(R|RÊt
targetpatht upperdirs((s/usr/lib64/python2.6/tarfile.pyR±Os4$



cCsJyti|d�Wn/tj
o#}|itijo�qFnXdS(s,Make a directory called targetpath.
iÀN(RgtmkdirR²terrnotEEXIST(R|RÊRÀRg((s/usr/lib64/python2.6/tarfile.pyR»s
cCsC|i|�}t|d�}t||�|i�|i�dS(s'Make a file called targetpath.
RKN(R·RORNR(R|RÊRÀtsourcettarget((s/usr/lib64/python2.6/tarfile.pyRº�s


cCs+|i||�|idd|i�dS(sYMake a file from a TarInfo object with an unknown type
at targetpath.
is9tarfile: Unknown file type %r, extracted as regular file.N(RºR�RÙ(R|RÊRÀ((s/usr/lib64/python2.6/tarfile.pyR¿�s cCs1ttd�oti|�n
td��dS(s'Make a fifo called targetpath.
tmkfifosfifo not supported by systemN(RyRgRÇRo(R|RÊRÀ((s/usr/lib64/python2.6/tarfile.pyR¼�scCs�ttd� pttd� otd��n|i}|i�o|tiO}n|tiO}ti||ti |i
|i ��dS(s<Make a character or block device called targetpath.
tmknodR½s'special devices not supported by systemN( RyRgRoR`R?R|tS_IFBLKtS_IFCHRRÈR½RÛRÜ(R|RÊRÀR`((s/usr/lib64/python2.6/tarfile.pyR½£s" 

 cCs!|i}y8|i�oti||�nti|i|�WnÙtj
oÍ|i�o4tiitii |i
�|�}t |�}ny|i |i
|�|�Wqttfj
oS}tii |�}yti||�Wqtj
o}td��qXqXnXdS(sµMake a (symbolic) link called targetpath. If it cannot be created
(platform limitation), we try to make a copy of the referenced file
instead of a link.
slink could not be createdN(RÚR9RgtsymlinktlinkR°RjRR>R¸R}RhR±RrR²RqRMtcopy2RQ(R|RÊRÀRRg((s/usr/lib64/python2.6/tarfile.pyR¾²s$ 

 c
Cs�to�ttd�orti�djo_yti|i�d}WnOtj
oCyti|i �d}Wq�tj
oti
�}q�XnXyti |i �d}WnOtj
oCyti
|i�d}Wqtj
oti�}qXnXy_|i�o'ttd�oti|||�n(tidjoti|||�nWq�tj
o}td��q�XndS(s6Set owner of targetpath according to tarinfo.
tgeteuidiitlchowntos2emxscould not change ownerN(R�RyRgRÎR�tgetgrnamRRqR�RtgetgidtgetpwnamRR�RtgetuidR9RÏtsystplatformR©R²Ro(R|RÊRÀRtuRg((s/usr/lib64/python2.6/tarfile.pyR©Ís,*cCsSttd�o?yti||i�WqOtj
o}td��qOXndS(sASet file permissions of targetpath according to tarinfo.
R«scould not change modeN(RyRgR«R`R²Ro(R|RÊRÀRg((s/usr/lib64/python2.6/tarfile.pyR«és
cCs]ttd�pdSy ti||i|if�Wn!tj
o}td��nXdS(sBSet modification time of targetpath according to tarinfo.
RªNs"could not change modification time(RyRgRªRR²Ro(R|RÊRÀRg((s/usr/lib64/python2.6/tarfile.pyRªòs  cCs|id�|idj o|i}d|_|S|ii|i�xÄto¼y8|ii|�}|djodS|i i
|�Wn|t j
op}|i o3|i
dd|i|f�|it7_qJq|idjott|���ndSnXPqJW|S(s¨Return the next member of the archive as a TarInfo object, when
TarFile is opened for reading. Return None if there is no more
available.
traNis0x%X: %si(RsRXRLR�R«R»R�RÊRRUR=R*RRR�R¯RpR (R|tmRÊRg((s/usr/lib64/python2.6/tarfile.pyR#ýs.
  

 cCsz|i�}|djot|�}n|i|�}x;t|ddd�D]#}|||ijo ||SqOWdS(s}Find an archive member by name from bottom to top.
If tarinfo is given, it is used as the starting point.
iiÿÿÿÿN(RuRLRtindexR+R}(R|R}RÊRUR0R.((s/usr/lib64/python2.6/tarfile.pyRp! s 
cCs:x*to"|i�}|djoPqqWt|_dS(sWRead through the entire archive file and look for readable
members.
N(R�R#RLRV(R|RÊ((s/usr/lib64/python2.6/tarfile.pyRt1 s  

cCs\|iotd|ii��n|dj o'|i|jotd|i��ndS(snCheck if TarFile is still open, and if the operation's mode
corresponds to TarFile's mode.
s %s is closedsbad operation for mode %rN(R�RQRâRlRLR`(R|R`((s/usr/lib64/python2.6/tarfile.pyRs; s
cCs&|iot|i�St|�SdS(s$Provide an iterator object.
N(RVtiterRUtTarIter(R|((s/usr/lib64/python2.6/tarfile.pyRÕD s
cCs%||ijoti|IJndS(s.Write debugging output to sys.stderr.
N(RSRÕtstderr(R|tleveltmsg((s/usr/lib64/python2.6/tarfile.pyR�L sN(:RlRmRnRSR�RQRRRTRER7RFR?RLR@RRÊRÆR¶R~RYR]RDtposixRGRoRzRcRlRnRaRRrRuRwR�R�R�R�R R®R¤R·R±R»RºR¿R¼R½R¾R©R«RªR#RpRtRsRÕR�(((s/usr/lib64/python2.6/tarfile.pyR¿sn  `  
H
 
c 9 % ! ' 0      $ 
RÜcBs)eZdZd�Zd�Zd�ZRS(sMIterator Class.

for tarinfo in TarFile(...):
suite...
cCs||_d|_dS(s$Construct a TarIter object.
iN(RÉRÚ(R|RÉ((s/usr/lib64/python2.6/tarfile.pyR~Z s cCs|S(s Return iterator object.
((R|((s/usr/lib64/python2.6/tarfile.pyRÕ_ scCs�|iip0|ii�}|pt|i_t�qpn4y|ii|i}Wntj
o
t�nX|id7_|S(s�Return the next item using TarFile's next() method.
When all members have been read, set TarFile as _loaded.
i(RÉRVR#R�t
StopIterationRURÚt
IndexError(R|RÊ((s/usr/lib64/python2.6/tarfile.pyR#c s
  (RlRmRnR~RÕR#(((s/usr/lib64/python2.6/tarfile.pyRÜS s  t_sectioncBs eZdZd�Zd�ZRS(s$Base class for _data and _hole.
cCs||_||_dS(N(R»R(R|R»R((s/usr/lib64/python2.6/tarfile.pyR~{ s cCs&|i|jo|i|ijSS(N(R»R(R|R»((s/usr/lib64/python2.6/tarfile.pyt __contains__~ s(RlRmRnR~Rä(((s/usr/lib64/python2.6/tarfile.pyRãx s RÃcBseZdZd�ZRS(s/Represent a data section in a sparse file.
cCs ti|||�||_dS(N(RãR~RÄ(R|R»RRÄ((s/usr/lib64/python2.6/tarfile.pyR~� s(RlRmRnR~(((s/usr/lib64/python2.6/tarfile.pyRÃ� sR%cBseZdZRS(s/Represent a hole section in a sparse file.
(RlRmRn(((s/usr/lib64/python2.6/tarfile.pyR%� sR$cBs eZdZd�Zd�ZRS(sMRingbuffer class which increases performance
over a regular list.
cCs
d|_dS(Ni(tidx(R|((s/usr/lib64/python2.6/tarfile.pyR~� scCs}|i}xdto\||}||joPn|d7}|t|�jo
d}n||ijodSq W||_|S(Nii(RåR�RRL(R|R»Råtitem((s/usr/lib64/python2.6/tarfile.pyR$� s 




 (RlRmRnR~R$(((s/usr/lib64/python2.6/tarfile.pyR$� s t
TarFileCompatcBsteZdZded�Zd�Zd�Zd�Zd�Zd�Z d�Z
d d d �Z d
�Z
d �ZRS(
sRTarFile class compatible with standard module zipfile's
ZipFile class.
R[cCsåddkl}|ddd�|tjoti||�|_n3|tjoti||�|_n
td��|dd!d joU|ii �}xC|D]7}|i
|_ |i |_
ti|i�d
|_q¢WndS( Niÿÿÿÿ(twarnpy3ks6the TarFileCompat class has been removed in Python 3.0t
stacklevelisunknown compression constantiiR[i(RZRèt TAR_PLAINRRcRÉt TAR_GZIPPEDRlR)RuR}R³Rt file_sizeR�tgmtimeRt date_time(R|tfileR`t compressionRèRURÙ((s/usr/lib64/python2.6/tarfile.pyR~« s 

   cCstd�|i��S(NcSs|iS((R}(RÙ((s/usr/lib64/python2.6/tarfile.pyRk¼ s(tmaptinfolist(R|((s/usr/lib64/python2.6/tarfile.pytnamelist» scCstd�|ii��S(NcSs
|itjS((RÙR6(RÙ((s/usr/lib64/python2.6/tarfile.pyRk¾ s(tfilterRÉRu(R|((s/usr/lib64/python2.6/tarfile.pyRò½ s cCs|ii�dS(N(RÉR�(R|((s/usr/lib64/python2.6/tarfile.pytprintdirÀ scCsdS(N((R|((s/usr/lib64/python2.6/tarfile.pyttestzip scCs|ii|�S(N(RÉRr(R|R}((s/usr/lib64/python2.6/tarfile.pytgetinfoÄ scCs"|ii|ii|��i�S(N(RÉR·RrRP(R|R}((s/usr/lib64/python2.6/tarfile.pyRPÆ scCs|ii||�dS(N(RÉR�(R|R³R�t
compress_type((s/usr/lib64/python2.6/tarfile.pyRRÈ sc Cs�yddkl}Wn#tj
oddkl}nXddk}t|i�}t|�|_|i|i �|_
|i i |||��dS(Niÿÿÿÿ(tStringIO(
t cStringIORùR�tcalendarRR³RRttimegmRîRRÉR (R|tzinfotbytesRùRûttinfo((s/usr/lib64/python2.6/tarfile.pytwritestrÊ s cCs|ii�dS(N(RÉR(R|((s/usr/lib64/python2.6/tarfile.pyRÔ sN(RlRmRnRêR~RóRòRõRöR÷RPRLRRRR(((s/usr/lib64/python2.6/tarfile.pyRç§ s      
cCs9yt|�}|i�tSWntj
otSXdS(sfReturn True if name points to a tar archive that we
are able to handle, else return False.
N(RzRR�RR�(R}R]((s/usr/lib64/python2.6/tarfile.pyRÛ s  
(vRnt __version__tversiont
__author__t__date__t __cvsid__t __credits__RÕRgRMR|RÃR�R3RüR+R¦RÖR�R�R�RLt__all__R R¯RoR÷RòRôRóRRØRR:R8R<R>RåR@tCONTTYPERúRùRRRRRêR2RíRER R6RR3RþR(R4tS_IFLNKtS_IFREGRÉtS_IFDIRRÊtS_IFIFOtTSUIDtTSGIDtTSVTXtTUREADtTUWRITEtTUEXECtTGREADtTGWRITEtTGEXECtTOREADtTOWRITEtTOEXECtgetfilesystemencodingRFtgetdefaultencodingR#R&R/R8RBRKRNR_ReRjRhRt ExceptionRRoRpRqRrR*RsR�tobjectR�R²RºRÆRRRÜRãRÃR%R�R$RêRëRçRRzRO(((s/usr/lib64/python2.6/tarfile.pyt<module>s.          

       
 
   
        
    
    
  
 ãDL�ÿÿ4ÿÿÿ�% 4