+
    f7i  c                  s,   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^RI	H
t
 ^RIHtHtHt ^RIHt ^RIHtHtHtHt ^RIHt ]P0                  '       d   ^ R	IHt ^ R
IHtHt ^RIHt  ! R R]
4      t ! R R]
4      t  ! R R]4      t!R# )    )annotationsN)datetime)FS)FileExpectedResourceNotFoundResourceReadOnly)Info)dirnameforcedirnormpathrelpath)TempFS)
Collection)IOAny)SubFSc                  sf    ] tR t^tRtRR R llt]P                  '       d   RR R lltRt	R# Rt	R# )	ZipFSzRead and write zip files.c               $    V ^8  d   QhRRRRRR/#    filestr | os.PathLikewriteboolencodingstr format   "G/usr/lib64/python3.14/site-packages/fontTools/misc/filesystem/_zipfs.py__annotate__ZipFS.__annotate__   s$     - -$--1-EH-    c                	s>    V'       d   \        W4      # \        W4      # N)
WriteZipFS	ReadZipFS)Zclsr   r   r      &&&&r   __new__ZZipFS.__new__   s     d--T,,r"   c               r   r   r   r   r   r   r    r!   %   s$     	 	)	26	JM	r"   c                	s    R # r#   r   )selfr   r   r   r&   r   __init__ZZipFS.__init__%   s     r"   r   N)Futf-8)
__name__
__module____qualname____firstlineno____doc__r'   typingTYPE_CHECKINGr)   __static_attributes__r   r"   r   r   r      s'    #- 	 	 r"   r   c                  s,  a  ] tR t^+tRtR(R V 3R llltR R ltR R ltR R	 lt]	R
 R l4       t
V 3R ltR)R R lltR R ltR R ltR R ltR R ltR*R R lltR*R R lltR R ltR R ltR R  ltR*R! R" lltR# R$ ltR+R% R& lltR'tV ;t# ),r%   zA readable zip file.c                    V ^8  d   QhRRRR/# r   r   r   r   r   r   r   r   r   r    ReadZipFS.__annotate__.   s     " ". "# "r"   c                	s   < \         SV `  4        \        P                  ! V4      V n        W n        \        P                  ! VR 4      V n        RV n	        R# )rN)
superr)   osfspath_filer   zipfileZZipFile_zip_directory_fsr(   r   r   	__class__   &&&r   r)   ZReadZipFS.__init__.   s<    YYt_
 OOD#.	!r"   c                   V ^8  d   QhRR/# r   returnr   r   r   r   r   r    r5   5   s     , ,# ,r"   c                	$    R V P                   : R2# )z
ReadZipFS()r:   r(      &r   __repr__ZReadZipFS.__repr__5   s    DJJ>++r"   c               rA   rB   r   r   r   r   r    r5   8   s     ) ) )r"   c                	"    R V P                    R2# )z<zipfs ''>rF   rG   rH   r   __str__ZReadZipFS.__str__8   s    $**R((r"   c                    V ^8  d   QhRRRR/# r   pathr   rC   r   r   r   r   r    r5   ;   s      c c r"   c                s    \        \        V4      4      pV P                  P                  V4      '       d   \	        V4      pV# )z"Convert a path to a zip file name.)r   r
   
_directoryisdirr	   r(   rO      &&r   _path_to_zip_nameZReadZipFS._path_to_zip_name;   s3    x~&??  &&D>Dr"   c               rA   )r   rC   r   r   r   r   r   r    r5   C   s     
" 
"F 
"r"   c                	sP   V P                   f   \        4       ;V n         pV P                  P                  4        F^  pTpVP	                  R4      '       d   VP                  VRR7       K1  VP                  \        V4      RR7       VP                  V4       K`  	  V P                   # )N/T)recreate)r=   r   r<   ZnamelistZendswithmakedirsr   create)r(   Z_fszip_nameZresource_names   &   r   rP   ZReadZipFS._directoryB   s    %'-x/D II..0 ( ))#..LLL>LL!7$LGJJ}- 1 !!!r"   c                	s   < \         \        V `  4        V P                  P                  4        V P                  e   V P                  P                  4        R # R # r#   )r7   r%   closer<   r=   )r(   r?   s   &r   rZ   ZReadZipFS.closeO   sA    i$&		)$$& *r"   c               r   )r   rO   r   
namespaceszCollection[str] | NonerC   r   r   r   r   r   r    r5   U   s"      C -C t r"   c           	     	sp   T;'       g    R
p/ pVR 8X  d'   RRRR/VR&   RV9   d   R\         P                  /VR&   MV P                  P                  V4      pRVP                  RVP
                  /VR&   RV9   d   V P                  V4      p V P                  P                  V4      pRV9   dn   RVP                  R\        VP
                  '       d   \         P                  M\         P                  4      R	\        VP                  !  P                  4       /VR&   \        V4      #   \         d     Li ; i)rU   nameZ is_dirTZbasicZdetailsZtypeZsizeZmodifiedr   )statZS_IFDIRrP   getinfor\   r]   rT   r<   Z	file_sizeZintZS_IFREGr   Z	date_timeZ	timestampZKeyErrorr   )r(   rO   r[   Zraw_infoZ
basic_inforY   Zzip_infos   &&&    r   r_   ZReadZipFS.getinfoU   s*   %%2
3;!'Xt <HWJ&'-t||&<#006J!'(JDUDU VHWJ&11$7#yy00:H !J."H$6$6"C0:0A0A0At||% '(2D2D(E(O(O(Q/+ H~   s   D' 'D54D5c               r3   r   rO   r   rC   r   r   r   r   r   r    r5   s        , ,3 ,4 ,r"   c                	X    V P                  4        V P                  P                  V4      # r#   )checkrP   existsrR   rS   r   rd   ZReadZipFS.existss        

%%d++r"   c               r3   r`   r   r   r   r   r    r5   w   s     + +# +$ +r"   c                	rb   r#   )rc   rP   rQ   rR   rS   r   rQ   ZReadZipFS.isdirw   s     

$$T**r"   c               r3   r`   r   r   r   r   r    r5   {   ra   r"   c                	rb   r#   )rc   rP   isfilerR   rS   r   rf   ZReadZipFS.isfile{   re   r"   c               rM   rN   r   r   r   r   r    r5      s     - -C -C -r"   c                	rb   r#   )rc   rP   listdirrR   rS   r   rg   ZReadZipFS.listdir   s     

&&t,,r"   c               r   r   rO   r   rV   r   rC   r   r   r   r   r   r    r5      s!     % %C %4 %E %r"   c                	8    V P                  4        \        V4      hr#   rc   r   r(   rO   rV      &&&r   makedirZReadZipFS.makedir       

t$$r"   c               r   rh   r   r   r   r   r    r5      s!     % %S %D %U %r"   c                	ri   r#   rj   rk   rl   r   rW   ZReadZipFS.makedirs   rn   r"   c               rA   r   rO   r   r   r   r   r   r    r5      s     % %3 %r"   c                	ri   r#   rj   rR   rS   r   removeZReadZipFS.remove   rn   r"   c               rA   ro   r   r   r   r   r    r5      s     % %c %r"   c                	ri   r#   rj   rR   rS   r   	removedirZReadZipFS.removedir   rn   r"   c               rA   ro   r   r   r   r   r    r5      s     % %s %r"   c                	ri   r#   rj   rR   rS   r   
removetreeZReadZipFS.removetree   rn   r"   c               $    V ^8  d   QhRRRRRR/# )r   srcr   dstrX   r   r   r   r   r   r    r5      s!     $ $3 $S $$ $r"   c                	ri   r#   rj   )r(   rt   ru   rX   r&   r   movedirZReadZipFS.movedir   s    

s##r"   c               r3   )r   rO   r   rC   Zbytesr   r   r   r   r    r5      s      c e r"   c                	s    V P                  4        V P                  P                  V4      '       g   \        V4      hV P	                  V4      pV P
                  P                  V4      pV# r#   )rc   rP   rf   r   rT   r<   Zread)r(   rO   rY   Z	zip_bytess   &&  r   	readbytesZReadZipFS.readbytes   sS    

%%d++"4(())$/IINN8,	r"   c               rs   )r   rO   r   moderC   zIO[Any]r   r   r   r   r    r5      s!     2 2 2C 2W 2r"   c                	sX  a V P                  4        V P                  P                  V4      '       d   \        V: R 24      hS^ ,          pVR8X  d1   V P                  P	                  V4      '       g   \        RV: 24      h\        ;QJ d    V3R lR 4       F  '       g   K   RM	  RM! V3R lR 4       4      '       d   \        V4      hV P                  V4      pV P                  P                  WT4      pRS9   d   V'       d   \        R4      hV# \        P                  ! V3/ VB # )	z is a directoryr6   zNo such file or directory: c              3  s,   <"   T F	  qS9   x  K  	  R # 5ir#   r   )Z.0Zmrx      & r   Z	<genexpr>Z!ReadZipFS.open.<locals>.<genexpr>   s     )&QDy&s   zwax+TFZbz*encoding args invalid for binary operation)rc   rP   rQ   r   rd   r   Zanyr   rT   r<   openZ
ValueErrorioZTextIOWrapper)r(   rO   rx   ZkwargsZzip_moderY   Zstreams   &&f,   r   rz   ZReadZipFS.open   s    

??  &&$9::7s?4??#9#9$#?#?"%@#IJJ3)&)333)&)))"4(())$/3$; !MNNM1&11r"   )r=   r:   r<   r   r*   r#   )F)Zrb)r+   r,   r-   r.   r/   r)   rI   rL   rT   ZpropertyrP   rZ   r_   rd   rQ   rf   rg   rm   rW   rp   rq   rr   rv   rw   rz   r2   __classcell__r?      @r   r%   r%   +   s~    " ",) 
" 
"'<,+,-%%%%%$2 2r"   r%   c                  sZ   a  ] tR t^tRtR
R V 3R llltR R ltR R ltV 3R ltR	t	V ;t
# )r$   zA writable zip file.c               r3   r4   r   r   r   r   r    WriteZipFS.__annotate__   s     ! !. !# !r"   c                	sf   < \         SV `  4        \        P                  ! V4      V n        W n        R # r#   )r7   r)   r8   r9   r:   r   r>   r@   r   r)   ZWriteZipFS.__init__   s"    YYt_
 r"   c               rA   rB   r   r   r   r   r    r      s     - -# -r"   c                	rD   )zWriteZipFS(rE   rF   rG   rH   r   rI   ZWriteZipFS.__repr__   s    TZZN!,,r"   c               rA   rB   r   r   r   r   r    r      s     / / /r"   c                	rJ   )z<zipfs-write 'rK   rF   rG   rH   r   rL   ZWriteZipFS.__str__   s    

|2..r"   c                	sJ  < \         P                  P                  V P                  4      ^ ,          p\        P
                  ! VRV P                  R7       V P                  VR,           8w  d)   \        P                  ! VR,           V P                  4       \        SV `%  4        R# )r    Zzip)r   Zroot_dirz.zipN)
r8   rO   Zsplitextr:   shutilZmake_archiveZ	_temp_dirZmover7   rZ   )r(   Z	base_namer?   ry   r   rZ   ZWriteZipFS.close   sg    GG$$TZZ03	IednnM::V++KK	F*DJJ7r"   )r:   r   r|   )r+   r,   r-   r.   r/   r)   rI   rL   rZ   r2   r}   r~   r   r   r$   r$      s$    ! !
-/ r"   r$   )"Z
__future__r   r{   r8   r   r^   r0   r;   r   Z_baser   Z_errorsr   r   r   Z_infor   Z_pathr   r	   r
   r   Z_tempfsr   r1   Zcollections.abcr   r   r   Z_subfsr   r   r%   r$   r   r"   r   <module>r      sn    " 	 	       E E  7 7 	*B &K2 K2\ r"   