+
    üÐjñ/  ã            	      ó‚  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHtH	t	H
t
HtHtHtHtHtHtHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHtHt ^ RIHtHtHtHtH t H!t! R	t"]! R
]#]$4      t%]! R]#]$4      t&]! RRR7      t']]! ]4       ! R R]]&]%3,          ]]&,          4      4       4       t( ! R R](]
]
3,          4      t)RR.t*R# )zt
This module contains implementations of L{IFilePath} for zip files.

See the constructor of L{ZipArchive} for use.
)ÚannotationsN)ÚIOÚTYPE_CHECKINGÚAnyÚAnyStrÚDictÚGenericÚIterableÚListÚTupleÚTypeVarÚUnion)ÚZipFile)Úimplementer)ÚLiteralÚSelf)ÚcmpÚ
comparable)ÚAbstractFilePathÚFilePathÚ	IFilePathÚOtherAnyStrÚUnlistableErrorÚ_coerceToFilesystemEncodingÚ/Ú_ArchiveStrÚ_ZipStrÚ_ZipSelfzZipPath[Any, Any])Úboundc                  óX  € ] tR t^4t$ RtR]R&   R R ltR R ltR R	 lt]	R
 R l4       t
R R ltR R lt]'       d   R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR4R& R' lltR( R) ltR* R+ ltR, R- ltR. R/ ltR0 R1 ltR2tR3# )5ÚZipPathz>
I represent a file or directory contained within a zip file.
r   Úpathc               ó$   € V ^8„  d   QhRRRRRR/# )é   ÚarchivezZipArchive[_ArchiveStr]ÚpathInArchiver   ÚreturnÚNone© )Úformats   "Ú8/usr/lib/python3/dist-packages/twisted/python/zippath.pyÚ__annotate__ÚZipPath.__annotate__=   s$   € ÷ &ñ &Ø.ð&Ø?Fð&à	ñ&ó    c                ó$  € Wn         W n        \        VP                  V4      V n        \        V\
        4      p\        W!P                  4      pV P                  P                  V4      p\        P                  P                  ! V.VO5!  pW`n        R# )z�
Don't construct me directly.  Use C{ZipArchive.child()}.

@param archive: a L{ZipArchive} instance.

@param pathInArchive: a ZIP_PATH_SEP-separated string.
N)
r$   r%   r   Ú_zipfileFilenameÚ_nativePathInArchiveÚZIP_PATH_SEPÚsplitÚosr!   Újoin)Úselfr$   r%   ÚsepÚarchiveFilenameÚsegmentsÚfakePaths   &&&    r*   Ú__init__ÚZipPath.__init__=   s|   € ð 18ŒØ&3ÔÜ1LØ×$Ñ$ mó2
ˆÔ!ô *¨-¼ÓFˆÜ#>Ø×3Ñ3ó$
ˆð #'×"4Ñ"4×":Ñ":¸3Ó"?ˆÜŸG™GŸLšL¨ÐD¸8ÓDˆØ%Ž	r-   c               ó    € V ^8„  d   QhRRRR/# ©r#   ÚotherÚobjectr&   Úintr(   )r)   s   "r*   r+   r,   W   s   € ÷ 
ñ 
˜Vð 
¨ñ 
r-   c                	óª   € \        V\        4      '       g   \        # \        V P                  V P
                  3VP                  VP
                  34      # ©N)Ú
isinstancer    ÚNotImplementedr   r$   r%   ©r5   r>   s   &&r*   Ú__cmp__ÚZipPath.__cmp__W   sE   € Ü˜%¤×)Ò)Ü!Ð!ÜØ�\‰\˜4×-Ñ-Ð.°·±À×@SÑ@SÐ0Tó
ð 	
r-   c               ó   € V ^8„  d   QhRR/# ©r#   r&   Ústrr(   )r)   s   "r*   r+   r,   ^   s   € ÷ 1ñ 1˜#ñ 1r-   c                	ón  € \        V P                  \        P                  P	                  V P
                  P                  4      4      .pVP                  V P                  P                  V P                  4      4       \        V P                  \        P                  4      pR VP                  V4      : R2# )zZipPath(Ú))
r   r6   r3   r!   Úabspathr$   Úextendr%   r2   r4   )r5   ÚpartsÚosseps   &  r*   Ú__repr__ÚZipPath.__repr__^   s€   € ô (¨¯©´"·'±'·/±/À$Ç,Á,×BSÑBSÓ2TÓUð
ˆð 	�‰�T×'Ñ'×-Ñ-¨d¯h©hÓ7Ô8Ü+¨D¯H©H´b·f±fÓ=ˆØ˜%Ÿ*™* UÓ+Ñ.¨aÐ0Ð0r-   c               ó   € V ^8„  d   QhRR/# ©r#   r&   r   r(   )r)   s   "r*   r+   r,   h   s   € ÷ Dñ D�Wñ Dr-   c                ó6   € \        V P                  \        4      # )zv
Return a zip directory separator.

@return: The zip directory separator.
@returntype: The same type as C{self.path}.
)r   r!   r1   ©r5   s   &r*   r6   ÚZipPath.sepg   s   € ô +¨4¯9©9´lÓCÐCr-   c               ó   € V ^8„  d   QhRR/# )r#   r&   z=Union[ZipPath[_ZipStr, _ArchiveStr], ZipArchive[_ArchiveStr]]r(   )r)   s   "r*   r+   r,   q   s   € ÷ 
Bñ 
Bà	Fñ
Br-   c                óè   € V P                   P                  V P                  4      p\        V4      ^8X  d   V P                  # \        V P                  V P                  P                  VRR 4      4      # )zS
Return parent, discarding our own encoding in favor of whatever the
archive's is.
Néÿÿÿÿ)r%   r2   r6   Úlenr$   r    r4   )r5   Úsplitups   & r*   Ú_nativeParentÚZipPath._nativeParentq   sX   € ð ×$Ñ$×*Ñ*¨4¯8©8Ó4ˆÜˆw‹<˜1ÔØ—<‘<ÐÜ�t—|‘| T§X¡X§]¡]°7¸3¸B°<Ó%@ÓAÐAr-   c               ó   € V ^8„  d   QhRR/# )r#   r&   z9Union[ZipPath[_ZipStr, _ArchiveStr], ZipArchive[_ZipStr]]r(   )r)   s   "r*   r+   r,   }   s   € ÷ ñ ÐQñ r-   c                	ó¸   € V P                  4       p\        V\        4      '       d4   \        \        V P                  V P
                  P                  4      4      # V# rB   )r]   rC   Ú
ZipArchiver   r!   r$   r/   )r5   Úparents   & r*   rb   ÚZipPath.parent}   sI   € Ø×#Ñ#Ó%ˆÜ�fœj×)Ò)ÜÜ+¨D¯I©I°t·|±|×7TÑ7TÓUóð ð ˆr-   c               ó   € V ^8„  d   QhRR/# )r#   r&   zCIterable[Union[ZipPath[_ZipStr, _ArchiveStr], ZipArchive[_ZipStr]]]r(   )r)   s   "r*   r+   r,   ‡   s   € ÷ 	ñ 	àPñ	r-   c                	ó   € R # rB   r(   rV   s   &r*   ÚparentsÚZipPath.parents‡   s   € ñ r-   c               ó    € V ^8„  d   QhRRRR/# ©r#   r!   r   r&   z!ZipPath[OtherAnyStr, _ArchiveStr]r(   )r)   s   "r*   r+   r,   Œ   s   € ÷ Iñ I˜+ð IÐ*Kñ Ir-   c                ó˜   € \        V\        4      p\        WP                  4      p\        V P                  VP                  W1.4      4      # )aÞ  
Return a new ZipPath representing a path in C{self.archive} which is
a child of this path.

@note: Requesting the C{".."} (or other special name) child will not
    cause L{InsecurePath} to be raised since these names do not have
    any special meaning inside a zip archive.  Be particularly
    careful with the C{path} attribute (if you absolutely must use
    it) as this means it may include special names with special
    meaning outside of the context of a zip archive.
)r   r1   r%   r    r$   r4   )r5   r!   Újoinerr%   s   &&  r*   ÚchildÚZipPath.childŒ   s=   € ô -¨T´<Ó@ˆÜ3°D×:LÑ:LÓMˆÜ�t—|‘| V§[¡[°-Ð1FÓ%GÓHÐHr-   c               ó    € V ^8„  d   QhRRRR/# ri   r(   )r)   s   "r*   r+   r,   œ   s   € ÷ ñ ˜Kð Ð,Mñ r-   c                	ó�   € V P                  4       p\        V\        4      '       d   V P                  MTpVP	                  V4      pV# rB   )rb   rC   ra   r$   rl   )r5   r!   rb   ÚrightTypedParentrl   s   &&   r*   ÚsiblingÚZipPath.siblingœ   s<   € ð —‘“ˆÜ+5°f¼j×+IÒ+I˜4Ÿ<š<ÈvÐØ3C×3IÑ3IÈ$Ó3OˆØˆr-   c               ó   € V ^8„  d   QhRR/# ©r#   r&   Úboolr(   )r)   s   "r*   r+   r,   ¥   s   € ÷ -ñ -˜ñ -r-   c                	óR   € V P                  4       ;'       g    V P                  4       # rB   )ÚisdirÚisfilerV   s   &r*   ÚexistsÚZipPath.exists¥   s   € Ø�z‰z‹|×,Ð,˜tŸ{™{›}Ð,r-   c               ó   € V ^8„  d   QhRR/# rt   r(   )r)   s   "r*   r+   r,   ¨   s   € ÷ ;ñ ;�tñ ;r-   c                	óH   € V P                   V P                  P                  9   # rB   )r%   r$   ÚchildmaprV   s   &r*   rw   ÚZipPath.isdir¨   s   € Ø×!Ñ! T§\¡\×%:Ñ%:Ñ:Ð:r-   c               ó   € V ^8„  d   QhRR/# rt   r(   )r)   s   "r*   r+   r,   «   s   € ÷ Eñ E˜ñ Er-   c                	ó\   € V P                   V P                  P                  P                  9   # rB   )r%   r$   ÚzipfileÚ
NameToInforV   s   &r*   rx   ÚZipPath.isfile«   s#   € Ø×!Ñ! T§\¡\×%9Ñ%9×%DÑ%DÑDÐDr-   c               ó   € V ^8„  d   QhRR/# rt   r(   )r)   s   "r*   r+   r,   ®   s   € ÷ ñ ˜ñ r-   c                	ó   € R # )Fr(   rV   s   &r*   ÚislinkÚZipPath.islink®   s   € Ùr-   c               ó   € V ^8„  d   QhRR/# )r#   r&   zList[_ZipStr]r(   )r)   s   "r*   r+   r,   ±   s   € ÷ ñ ˜ñ r-   c                	óâ  € V P                  4       '       d³   V P                  4       '       dz   \        V P                  P                  V P
                  4      pV P                  P                  V,          P                  4        Uu. uF  p\        V P                  V4      NK  	  up# \        \        \        P                  R 4      4      h\        \        \        P                  R4      4      hu upi )zLeaf zip entry listedzNon-existent zip entry listed)ry   rw   r   r$   r/   r%   r}   Úkeysr!   r   ÚOSErrorÚerrnoÚENOTDIRÚENOENT)r5   ÚparentArchivePathÚeachs   &  r*   ÚlistdirÚZipPath.listdir±   s¸   € Ø�;‰;�=Š=Ø�z‰z�|Š|Ü1LØ—L‘L×1Ñ1°4×3EÑ3Eó2Ð!ð
 !%§¡× 5Ñ 5Ð6GÕ H× MÑ MÔ Oóá O˜ô 0°·	±	¸4Ö@Ù Oñð ô
 &¤g¬e¯m©mÐ=TÓ&UÓVÐVä!ÜœŸ™Ð&EÓFóð ùòs   ÂC,c               ó   € V ^8„  d   QhRR/# )r#   r&   zTuple[_ZipStr, _ZipStr]r(   )r)   s   "r*   r+   r,   Â   s   € ÷ +ñ +Ð1ñ +r-   c                óT   € \         P                  P                  V P                  4      # )zA
Return a value similar to that returned by C{os.path.splitext}.
)r3   r!   ÚsplitextrV   s   &r*   r•   ÚZipPath.splitextÂ   s   € ô �w‰w×Ñ §	¡	Ó*Ð*r-   c               ó   € V ^8„  d   QhRR/# rT   r(   )r)   s   "r*   r+   r,   Ë   s   € ÷ 6ñ 6˜'ñ 6r-   c                	óZ   € V P                   P                  V P                  4      R,          # )é   rZ   )r%   r2   r6   rV   s   &r*   ÚbasenameÚZipPath.basenameË   s"   € Ø×!Ñ!×'Ñ'¨¯©Ó1°"Õ5Ð5r-   c               ó   € V ^8„  d   QhRR/# rT   r(   )r)   s   "r*   r+   r,   Î   s   € ÷ "ñ "˜ñ "r-   c                	ó6   € V P                  4       P                  # rB   )rb   r!   rV   s   &r*   ÚdirnameÚZipPath.dirnameÎ   s   € ð �{‰{‹}×!Ñ!Ð!r-   c               ó    € V ^8„  d   QhRRRR/# )r#   ÚmodezLiteral['r', 'w']r&   z	IO[bytes]r(   )r)   s   "r*   r+   r,   Ó   s   € ÷ Cñ CÐ*ð C°Yñ Cr-   c                	óz   € \        R V P                  4      pV P                  P                  P	                  W!R7      # )Ú )r¡   )r   r%   r$   r�   Úopen)r5   r¡   r%   s   && r*   r¤   ÚZipPath.openÓ   s4   € ô 4°B¸×8JÑ8JÓKˆØ�|‰|×#Ñ#×(Ñ(¨Ð(ÓBÐBr-   c               ó   € V ^8„  d   QhRR/# )r#   r&   r'   r(   )r)   s   "r*   r+   r,   Ú   s   € ÷ ñ ˜ñ r-   c                	ó   € R # rB   r(   rV   s   &r*   ÚchangedÚZipPath.changedÚ   s   € Ùr-   c               ó   € V ^8„  d   QhRR/# )r#   r&   r@   r(   )r)   s   "r*   r+   r,   Ý   s   € ÷ Hñ H˜ñ Hr-   c                ó�   € \        RV P                  4      pV P                  P                  P                  V,          P
                  # )z:
Retrieve this file's size.

@return: file size, in bytes
r£   )r   r%   r$   r�   r‚   Ú	file_size©r5   r%   s   & r*   ÚgetsizeÚZipPath.getsizeÝ   s7   € ô 4°B¸×8JÑ8JÓKˆØ�|‰|×#Ñ#×.Ñ.¨}Õ=×GÑGÐGr-   c               ó   € V ^8„  d   QhRR/# ©r#   r&   Úfloatr(   )r)   s   "r*   r+   r,   æ   s   € ÷ ,ñ ,˜uñ ,r-   c                ó6   € V P                   P                  4       # )z‘
Retrieve this file's last access-time.  This is the same as the last access
time for the archive.

@return: a number of seconds since the epoch
)r$   ÚgetAccessTimerV   s   &r*   r´   ÚZipPath.getAccessTimeæ   s   € ð �|‰|×)Ñ)Ó+Ð+r-   c               ó   € V ^8„  d   QhRR/# r±   r(   )r)   s   "r*   r+   r,   ï   s   € ÷ 

ñ 

 Uñ 

r-   c                óÆ   € \        RV P                  4      p\        P                  ! V P                  P
                  P                  V,          P                  R,           4      # )z˜
Retrieve this file's last modification time.  This is the time of
modification recorded in the zipfile.

@return: a number of seconds since the epoch.
r£   )é    r¸   r¸   )r   r%   ÚtimeÚmktimer$   r�   r‚   Ú	date_timer­   s   & r*   ÚgetModificationTimeÚZipPath.getModificationTimeï   sJ   € ô 4°B¸×8JÑ8JÓKˆÜ�{Š{Ø�L‰L× Ñ ×+Ñ+¨MÕ:×DÑDÀyÕPó
ð 	
r-   c               ó   € V ^8„  d   QhRR/# r±   r(   )r)   s   "r*   r+   r,   û   s   € ÷ *ñ * Uñ *r-   c                ó"   € V P                  4       # )z¯
Retrieve this file's last modification time.  This name is provided for
compatibility, and returns the same value as getmtime.

@return: a number of seconds since the epoch.
)r¼   rV   s   &r*   ÚgetStatusChangeTimeÚZipPath.getStatusChangeTimeû   s   € ð ×'Ñ'Ó)Ð)r-   )r0   r$   r!   r%   N)Úr) Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__r:   rF   rQ   Úpropertyr6   r]   rb   r   rf   rl   rq   ry   rw   rx   r†   r‘   r•   rš   rž   r¤   r¨   r®   r´   r¼   rÀ   Ú__static_attributes__r(   r-   r*   r    r    4   s¡   ‡ ñð ƒMõ&õ4
õ1ð ôDó ðDõ
Bõ÷ õ	õ
Iõ õ-õ;õEõõõ"+õ6õ"÷
CõõHõ,õ

÷*ñ *r-   r    c                  óœ   € ] tR tRt$ RtR]R&   ]R R l4       tR R ltR	 R
 lt	R R lt
R R ltR R ltR R ltR R ltR R ltRtR# )ra   i  aÈ  
I am a L{FilePath}-like object which can wrap a zip archive as if it were a
directory.

It works similarly to L{FilePath} in L{bytes} and L{unicode} handling --
instantiating with a L{bytes} will return a "bytes mode" L{ZipArchive},
and instantiating with a L{unicode} will return a "text mode"
L{ZipArchive}. Methods that return new L{ZipArchive} or L{ZipPath}
instances will be in the mode of the argument to the creator method,
converting if required.
r   r/   c               ó   € V ^8„  d   QhRR/# )r#   r&   r   r(   )r)   s   "r*   r+   ÚZipArchive.__annotate__  s   € ÷ ñ ˜ñ r-   c                	ó   € V # rB   r(   rV   s   &r*   r$   ÚZipArchive.archive  s   € àˆr-   c               ó    € V ^8„  d   QhRRRR/# )r#   ÚarchivePathnamer   r&   r'   r(   )r)   s   "r*   r+   rÍ     s   € ÷ Fñ F¨ð F°4ñ Fr-   c                ó€  € Wn         \        \        RV4      4      V n        V P                  P                  pVf   Q R4       h\        W4      V n        \        VR4      V n        / V n        V P                  P                  4        F¶  p\        V P                   V4      P                  V P                  4      p\        \        V4      4       F`  pWE) ,          pV P                  P                  VRV)  4      pWpP                  9  d   / V P                  V&   ^V P                  V,          V&   Kb  	  \        VR4      pK¸  	  R# )z¥
Create a ZipArchive, treating the archive at archivePathname as a zip
file.

@param archivePathname: a L{bytes} or L{unicode}, naming a path in the
    filesystem.
r£   Nz7zipfile must have filename when initialized with a path)r!   r   r   r�   Úfilenamer/   r%   r}   Únamelistr2   r6   Úranger[   r4   )r5   rÑ   ÚzfnameÚnameÚ	splitNameÚxrl   rb   s   &&      r*   r:   ÚZipArchive.__init__  s  € ð $Œ	ÜÔ:¸2¸ÓOÓPˆŒØ—‘×&Ñ&ˆàÒð	EàDó	EØä ;¸OÓ TˆÔÜ8¸È"ÓMˆÔð :<ˆŒà—L‘L×)Ñ)Ö+ˆDÜ3°D·I±I¸tÓD×JÑJÈ4Ï8É8ÓTˆIÜœ3˜y›>Ö*�Ø! "��ØŸ™Ÿ™ y°°1°" ~Ó6�Ø§¡Ô.Ø,.�D—M‘M &Ñ)Ø/0�—‘˜fÕ% eÓ,ñ +ô 1°À"ÓEŠFó ,r-   c               ó    € V ^8„  d   QhRRRR/# r=   r(   )r)   s   "r*   r+   rÍ   6  s   € ÷ *ñ *˜Vð *¨ñ *r-   c                	óz   € \        V\        4      '       g   \        # \        V P                  VP                  4      # rB   )rC   ra   rD   r   r!   rE   s   &&r*   rF   ÚZipArchive.__cmp__6  s*   € Ü˜%¤×,Ò,Ü!Ð!Ü�4—9‘9˜eŸj™jÓ)Ð)r-   c               ó    € V ^8„  d   QhRRRR/# )r#   r!   r   r&   zZipPath[OtherAnyStr, AnyStr]r(   )r)   s   "r*   r+   rÍ   ;  s   € ÷ #ñ #˜+ð #Ð*Fñ #r-   c                ó   € \        W4      # )zÀ
Create a ZipPath pointing at a path within the archive.

@param path: a L{bytes} or L{unicode} with no path separators in it
    (either '/' or the system path separator, if it's different).
)r    )r5   r!   s   &&r*   rl   ÚZipArchive.child;  s   € ô �tÓ"Ð"r-   c               ó   € V ^8„  d   QhRR/# rt   r(   )r)   s   "r*   r+   rÍ   D  s   € ÷ 8ñ 8˜ñ 8r-   c                óH   € \        V P                  4      P                  4       # )z3
Returns C{True} if the underlying archive exists.
)r   r/   ry   rV   s   &r*   ry   ÚZipArchive.existsD  s   € ô ˜×-Ñ-Ó.×5Ñ5Ó7Ð7r-   c               ó   € V ^8„  d   QhRR/# r±   r(   )r)   s   "r*   r+   rÍ   J  s   € ÷ ?ñ ?˜uñ ?r-   c                óH   € \        V P                  4      P                  4       # )z-
Return the archive file's last access time.
)r   r/   r´   rV   s   &r*   r´   ÚZipArchive.getAccessTimeJ  s   € ô ˜×-Ñ-Ó.×<Ñ<Ó>Ð>r-   c               ó   € V ^8„  d   QhRR/# r±   r(   )r)   s   "r*   r+   rÍ   P  ó   € ÷ Eñ E Uñ Er-   c                óH   € \        V P                  4      P                  4       # )z.
Return the archive file's modification time.
)r   r/   r¼   rV   s   &r*   r¼   ÚZipArchive.getModificationTimeP  ó   € ô ˜×-Ñ-Ó.×BÑBÓDÐDr-   c               ó   € V ^8„  d   QhRR/# r±   r(   )r)   s   "r*   r+   rÍ   V  rè   r-   c                óH   € \        V P                  4      P                  4       # )z/
Return the archive file's status change time.
)r   r/   rÀ   rV   s   &r*   rÀ   ÚZipArchive.getStatusChangeTimeV  rë   r-   c               ó   € V ^8„  d   QhRR/# rI   r(   )r)   s   "r*   r+   rÍ   \  s   € ÷ =ñ =˜#ñ =r-   c                	ó^   € R \         P                  P                  V P                  4      : R2# )zZipArchive(rL   )r3   r!   rM   rV   s   &r*   rQ   ÚZipArchive.__repr__\  s#   € ØœRŸW™WŸ_™_¨T¯Y©YÓ7Ñ:¸!Ð<Ð<r-   )r/   r}   r!   r%   r�   N)rÃ   rÄ   rÅ   rÆ   rÇ   rÈ   rÉ   r$   r:   rF   rl   ry   r´   r¼   rÀ   rQ   rÊ   r(   r-   r*   ra   ra     sQ   ‡ ñ
ð Óàôó ðõFõ<*õ
#õ8õ?õEõE÷=ñ =r-   ra   )+rÇ   Ú
__future__r   rŒ   r3   r¹   Útypingr   r   r   r   r   r   r	   r
   r   r   r   r�   r   Úzope.interfacer   r   r   Útwisted.python.compatr   r   Útwisted.python.filepathr   r   r   r   r   r   r1   ÚbytesrJ   r   r   r   r    ra   Ú__all__r(   r-   r*   Ú<module>rù      sØ   ðñ
õ
 #ã Û 	Û ÷÷ ÷ ñ õ å &ç  ç 1÷÷ ð €ñ �m U¨CÓ0€Ù
�)˜U CÓ
(€Ù�:Ð%8Ô9€ð ÙˆYÓôL*ˆg�g˜{Ð*Õ+Ð-=¸gÕ-Fó L*ó ó ðL*ô^X=�˜ ˜Õ(ô X=ðv ˜Ð
#‚r-   