ó
    Ö›‘hü/  ã            	      ób  • S r SSKJr  SSKrSSKrSSKrSSKJrJrJ	r	J
r
JrJrJrJrJrJrJr  SSKJr  SSKJr  SSKJrJr  SSKJrJr  SS	KJrJrJrJ r J!r!J"r"  S
r#\" S\$\%5      r&\" S\$\%5      r'\" SSS9r(\\" \5       " S S\\'\&4   \\'   5      5       5       r) " S S\)\
\
4   5      r*SS/r+g)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                  ó:  • \ rS rSr% SrS\S'         SS jrSS jrS S jr\	S!S j5       r
  S"S	 jrS#S
 jr\(       a    S$S jrS%S jrS%S jrS&S jrS&S jrS&S jrS&S jrS'S jrS(S jrS!S jrS!S jrS)S*S jjrS+S jrS,S jrS-S jrS-S jrS-S jrSrg).ÚZipPathé4   z>
I represent a file or directory contained within a zip file.
r   Úpathc                ó   • Xl         X l        [        UR                  U5      U l        [        U[
        5      n[        X!R                  5      nU R                  R                  U5      n[        R                  R                  " U/UQ76 nX`l        g)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)
ÚarchiveÚpathInArchiver   Ú_zipfileFilenameÚ_nativePathInArchiveÚZIP_PATH_SEPÚsplitÚosr#   Újoin)Úselfr%   r&   ÚsepÚarchiveFilenameÚsegmentsÚfakePaths          ÚZC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/python/zippath.pyÚ__init__ÚZipPath.__init__=   s|   € ð 18ŒØ&3ÔÜ1LØ×$Ñ$ mó2
ˆÔ!ô *¨-¼ÓFˆÜ#>Ø×3Ñ3ó$
ˆð #'×"4Ñ"4×":Ñ":¸3Ó"?ˆÜŸG™GŸLšL¨ÐD¸8ÒDˆØ%�	ó    c                ó¨   • [        U[        5      (       d  [        $ [        U R                  U R
                  4UR                  UR
                  45      $ ©N)Ú
isinstancer!   ÚNotImplementedr   r%   r&   ©r-   Úothers     r2   Ú__cmp__ÚZipPath.__cmp__W   sE   € Ü˜%¤×)Ñ)Ü!Ð!ÜØ�\‰\˜4×-Ñ-Ð.°·±À×@SÑ@SÐ0Tó
ð 	
r5   c                ón  • [        U R                  [        R                  R	                  U R
                  R                  5      5      /nUR                  U R                  R                  U R                  5      5        [        U R                  [        R                  5      nSUR                  U5      < S3$ )NzZipPath(Ú))
r   r.   r+   r#   Úabspathr%   Úextendr&   r*   r,   )r-   ÚpartsÚosseps      r2   Ú__repr__ÚZipPath.__repr__^   s€   € ô (¨¯©´"·'±'·/±/À$Ç,Á,×BSÑBSÓ2TÓUð
ˆð 	�‰�T×'Ñ'×-Ñ-¨d¯h©hÓ7Ô8Ü+¨D¯H©H´b·f±fÓ=ˆØ˜%Ÿ*™* UÓ+Ñ.¨aÐ0Ð0r5   c                ó6   • [        U R                  [        5      $ )zv
Return a zip directory separator.

@return: The zip directory separator.
@returntype: The same type as C{self.path}.
)r   r#   r)   ©r-   s    r2   r.   ÚZipPath.sepg   s   € ô +¨4¯9©9´lÓCÐCr5   c                óæ   • U R                   R                  U R                  5      n[        U5      S:X  a  U R                  $ [        U R                  U R                  R                  USS 5      5      $ )zS
Return parent, discarding our own encoding in favor of whatever the
archive's is.
é   Néÿÿÿÿ)r&   r*   r.   Úlenr%   r!   r,   )r-   Úsplitups     r2   Ú_nativeParentÚZipPath._nativeParentq   sX   € ð ×$Ñ$×*Ñ*¨4¯8©8Ó4ˆÜˆw‹<˜1ÓØ—<‘<ÐÜ�t—|‘| T§X¡X§]¡]°7¸3¸B°<Ó%@ÓAÐAr5   c                ó¶   • U R                  5       n[        U[        5      (       a3  [        [        U R                  U R
                  R                  5      5      $ U$ r7   )rN   r8   Ú
ZipArchiver   r#   r%   r'   )r-   Úparents     r2   rR   ÚZipPath.parent}   sI   € Ø×#Ñ#Ó%ˆÜ�fœj×)Ñ)ÜÜ+¨D¯I©I°t·|±|×7TÑ7TÓUóð ð ˆr5   c                ó   • g r7   © rG   s    r2   ÚparentsÚZipPath.parents‡   s   € ð r5   c                ó˜   • [        U[        5      n[        XR                  5      n[        U R                  UR                  X1/5      5      $ )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   r)   r&   r!   r%   r,   )r-   r#   Újoinerr&   s       r2   ÚchildÚZipPath.childŒ   s=   € ô -¨T´<Ó@ˆÜ3°D×:LÑ:LÓMˆÜ�t—|‘| V§[¡[°-Ð1FÓ%GÓHÐHr5   c                óŽ   • U R                  5       n[        U[        5      (       a  U R                  OUnUR	                  U5      nU$ r7   )rR   r8   rQ   r%   rZ   )r-   r#   rR   ÚrightTypedParentrZ   s        r2   ÚsiblingÚZipPath.siblingœ   s<   € ð —‘“ˆÜ+5°f¼j×+IÑ+I˜4Ÿ<š<ÈvÐØ3C×3IÑ3IÈ$Ó3OˆØˆr5   c                óP   • U R                  5       =(       d    U R                  5       $ r7   )ÚisdirÚisfilerG   s    r2   ÚexistsÚZipPath.exists¥   s   € Ø�z‰z‹|×,˜tŸ{™{›}Ð,r5   c                óH   • U R                   U R                  R                  ;   $ r7   )r&   r%   ÚchildmaprG   s    r2   ra   ÚZipPath.isdir¨   s   € Ø×!Ñ! T§\¡\×%:Ñ%:Ñ:Ð:r5   c                ó\   • U R                   U R                  R                  R                  ;   $ r7   )r&   r%   ÚzipfileÚ
NameToInforG   s    r2   rb   ÚZipPath.isfile«   s#   € Ø×!Ñ! T§\¡\×%9Ñ%9×%DÑ%DÑDÐDr5   c                ó   • g)NFrU   rG   s    r2   ÚislinkÚZipPath.islink®   s   € Ør5   c                óØ  • U R                  5       (       a®  U R                  5       (       av  [        U R                  R                  U R
                  5      nU R                  R                  U   R                  5        Vs/ s H  n[        U R                  U5      PM     sn$ [        [        [        R                  S5      5      e[        [        [        R                  S5      5      es  snf )NzLeaf zip entry listedzNon-existent zip entry listed)rc   ra   r   r%   r'   r&   rf   Úkeysr#   r   ÚOSErrorÚerrnoÚENOTDIRÚENOENT)r-   ÚparentArchivePathÚeachs      r2   Ú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                óT   • [         R                  R                  U R                  5      $ )zA
Return a value similar to that returned by C{os.path.splitext}.
)r+   r#   ÚsplitextrG   s    r2   rz   ÚZipPath.splitextÂ   s   € ô �w‰w×Ñ §	¡	Ó*Ð*r5   c                óR   • U R                   R                  U R                  5      S   $ )NrK   )r&   r*   r.   rG   s    r2   ÚbasenameÚZipPath.basenameË   s"   € Ø×!Ñ!×'Ñ'¨¯©Ó1°"Ñ5Ð5r5   c                ó6   • U R                  5       R                  $ r7   )rR   r#   rG   s    r2   ÚdirnameÚZipPath.dirnameÎ   s   € ð �{‰{‹}×!Ñ!Ð!r5   c                ót   • [        SU R                  5      nU R                  R                  R	                  X!S9$ )NÚ )Úmode)r   r&   r%   ri   Úopen)r-   r„   r&   s      r2   r…   ÚZipPath.openÓ   s4   € ô 4°B¸×8JÑ8JÓKˆØ�|‰|×#Ñ#×(Ñ(¨Ð(ÐBÐBr5   c                ó   • g r7   rU   rG   s    r2   ÚchangedÚZipPath.changedÚ   s   € Ør5   c                óˆ   • [        SU R                  5      nU R                  R                  R                  U   R
                  $ )z:
Retrieve this file's size.

@return: file size, in bytes
rƒ   )r   r&   r%   ri   rj   Ú	file_size©r-   r&   s     r2   ÚgetsizeÚZipPath.getsizeÝ   s7   € ô 4°B¸×8JÑ8JÓKˆØ�|‰|×#Ñ#×.Ñ.¨}Ñ=×GÑGÐGr5   c                ó6   • U R                   R                  5       $ )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%   ÚgetAccessTimerG   s    r2   r�   ÚZipPath.getAccessTimeæ   s   € ð �|‰|×)Ñ)Ó+Ð+r5   c                ó¶   • [        SU R                  5      n[        R                  " U R                  R
                  R                  U   R                  S-   5      $ )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   r&   ÚtimeÚmktimer%   ri   rj   Ú	date_timerŒ   s     r2   ÚgetModificationTimeÚZipPath.getModificationTimeï   sJ   € ô 4°B¸×8JÑ8JÓKˆÜ�{Š{Ø�L‰L× Ñ ×+Ñ+¨MÑ:×DÑDÀyÑPó
ð 	
r5   c                ó"   • U R                  5       $ )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–   rG   s    r2   ÚgetStatusChangeTimeÚZipPath.getStatusChangeTimeû   s   € ð ×'Ñ'Ó)Ð)r5   )r(   r%   r#   r&   N)r%   zZipArchive[_ArchiveStr]r&   r   ÚreturnÚNone©r;   Úobjectr›   Úint©r›   Ústr)r›   r   )r›   z=Union[ZipPath[_ZipStr, _ArchiveStr], ZipArchive[_ArchiveStr]])r›   z9Union[ZipPath[_ZipStr, _ArchiveStr], ZipArchive[_ZipStr]])r›   zCIterable[Union[ZipPath[_ZipStr, _ArchiveStr], ZipArchive[_ZipStr]]])r#   r   r›   z!ZipPath[OtherAnyStr, _ArchiveStr]©r›   Úbool)r›   zList[_ZipStr])r›   zTuple[_ZipStr, _ZipStr])Úr)r„   zLiteral['r', 'w']r›   z	IO[bytes])r›   rœ   )r›   rŸ   ©r›   Úfloat) Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__r3   r<   rD   Úpropertyr.   rN   rR   r   rV   rZ   r^   rc   ra   rb   rm   rw   rz   r}   r€   r…   rˆ   r�   r�   r–   r™   Ú__static_attributes__rU   r5   r2   r!   r!   4   sÅ   ‡ ñð ƒMð&Ø.ð&Ø?Fð&à	ô&ô4
ô1ð óDó ðDð
Bà	Fô
Bôö ð	àPô	ô
Iô ô-ô;ôEôôô"+ô6ô"ö
CôôHô,ô

÷*r5   r!   c                  óˆ   • \ rS rSr% SrS\S'   \SS j5       rSS jrSS jr	SS jr
SS	 jrSS
 jrSS jrSS jrSS jrSrg)rQ   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                ó   • U $ r7   rU   rG   s    r2   r%   ÚZipArchive.archive  s   € àˆr5   c                ój  • Xl         [        [        SU5      5      U l        U R                  R                  nUc   S5       e[        X5      U l        [        US5      U l        0 U l        U R                  R                  5        H­  n[        U R                   U5      R                  U R                  5      n[        [        U5      5       HW  nXE*    nU R                  R                  USU*  5      nXpR                  ;  a  0 U R                  U'   SU R                  U   U'   MY     [        US5      nM¯     g)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 pathrJ   )r#   r   r   ri   Úfilenamer'   r&   rf   Únamelistr*   r.   ÚrangerL   r,   )r-   ÚarchivePathnameÚzfnameÚnameÚ	splitNameÚxrZ   rR   s           r2   r3   Ú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ò ,r5   c                óx   • [        U[        5      (       d  [        $ [        U R                  UR                  5      $ r7   )r8   rQ   r9   r   r#   r:   s     r2   r<   ÚZipArchive.__cmp__6  s*   € Ü˜%¤×,Ñ,Ü!Ð!Ü�4—9‘9˜eŸj™jÓ)Ð)r5   c                ó   • [        X5      $ )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!   )r-   r#   s     r2   rZ   ÚZipArchive.child;  s   € ô �tÓ"Ð"r5   c                óH   • [        U R                  5      R                  5       $ )z3
Returns C{True} if the underlying archive exists.
)r   r'   rc   rG   s    r2   rc   ÚZipArchive.existsD  s   € ô ˜×-Ñ-Ó.×5Ñ5Ó7Ð7r5   c                óH   • [        U R                  5      R                  5       $ )z-
Return the archive file's last access time.
)r   r'   r�   rG   s    r2   r�   ÚZipArchive.getAccessTimeJ  s   € ô ˜×-Ñ-Ó.×<Ñ<Ó>Ð>r5   c                óH   • [        U R                  5      R                  5       $ )z.
Return the archive file's modification time.
)r   r'   r–   rG   s    r2   r–   ÚZipArchive.getModificationTimeP  ó   € ô ˜×-Ñ-Ó.×BÑBÓDÐDr5   c                óH   • [        U R                  5      R                  5       $ )z/
Return the archive file's status change time.
)r   r'   r™   rG   s    r2   r™   ÚZipArchive.getStatusChangeTimeV  rÆ   r5   c                ó^   • S[         R                  R                  U R                  5      < S3$ )NzZipArchive(r?   )r+   r#   r@   rG   s    r2   rD   ÚZipArchive.__repr__\  s#   € ØœRŸW™WŸ_™_¨T¯Y©YÓ7Ñ:¸!Ð<Ð<r5   )r'   rf   r#   r&   ri   N)r›   r   )r¶   r   r›   rœ   r�   )r#   r   r›   zZipPath[OtherAnyStr, AnyStr]r¢   r¥   r    )r§   r¨   r©   rª   r«   r¬   r­   r%   r3   r<   rZ   rc   r�   r–   r™   rD   r®   rU   r5   r2   rQ   rQ     sL   ‡ ñ
ð Óàóó ðôFô<*ô
#ô8ô?ôEôE÷=r5   rQ   ),r«   Ú
__future__r   rr   r+   r“   Útypingr   r   r   r   r   r	   r
   r   r   r   r   ri   r   Úzope.interfacer   Útyping_extensionsr   r   Útwisted.python.compatr   r   Útwisted.python.filepathr   r   r   r   r   r   r)   Úbytesr¡   r   r   r   r!   rQ   Ú__all__rU   r5   r2   Ú<module>rÓ      sØ   ðñ
õ
 #ã Û 	Û ÷÷ ÷ ñ õ å &ç +ç 1÷÷ ð €ñ �m U¨CÓ0€Ù
�)˜U CÓ
(€Ù�:Ð%8Ñ9€ð ÙˆYÓôL*ˆg�g˜{Ð*Ñ+Ð-=¸gÑ-Fó L*ó ó ðL*ô^X=�˜ ˜Ñ(ô X=ðv ˜Ð
#�r5   