+
    BiD*                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHtHtHt ^RI	H
t
 ]
'       d   ^ RIHtHtHt M
^ RIHtHtHt  ! R R4      t ! R R]4      t]! 4       t ! R	 R
]4      t ! R R4      t ! R R]4      t ! R R]4      tR# )    N)S_IFMTS_ISDIRS_ISREGS_ISLNK)is_pypi)PathInfo_ReadablePath_WritablePathc                   x   a  ] tR t^t o RtR tRR ltR tRR ltR t	R t
R tR	 tR
 t]tR tR tR tRtV tR# )ZipPathGroundTc                    Wn         R # Npath_cls)selfr   s   &&9/usr/lib/python3.14/test/test_pathlib/support/zip_path.py__init__ZipPathGround.__init__   s         c                v    V P                  \        P                  ! \        P                  ! 4       R 4      R7      # )wzip_file)r   zipfileZipFileioBytesIO)r   local_suffixs   &&r   setupZipPathGround.setup   s$    }}goobjjlC&H}IIr   c                :    VP                   P                  4        R # r   )r   close)r   roots   &&r   teardownZipPathGround.teardown!   s    r   c                P    VP                   P                  \        V4      V4       R # r   )r   writestrstr)r   pathdatas   &&&r   create_fileZipPathGround.create_file$   s    s4y$/r   c                4   \         P                  ! \        V4      R ,           4      pV;P                  \        P
                  ^,          ,          un        V;P                  \        P                  ,          un        VP                  P                  VR4       R# / N	r   ZipInfor(   external_attrstatS_IFDIRFILE_ATTRIBUTE_DIRECTORYr   r'   )r   r)   zip_infos   && r   
create_dirZipPathGround.create_dir'   s]    ??3t9s?3$,,""44$"?"??x,r   c                    \         P                  ! \        V4      4      p\        P                  ^,          Vn        VP                  P                  W2P                  4       4       R#    N)	r   r2   r(   r4   S_IFLNKr3   r   r'   encode)r   r)   targetr7   s   &&& r   create_symlinkZipPathGround.create_symlink-   s=    ??3t9-!%!3x9r   c                   V P                  VP                  R 4      R4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  R4      R	4       V P                  VP                  R
4      R 4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       R# )fileAs   this is file A
z
dirB/fileBs   this is file B
z
dirC/fileCs   this is file C
zdirC/dirD/fileDs   this is file D
zdirC/novel.txts   this is a novel
linkAlinkBdirBz
dirA/linkCz../dirB
brokenLinkznon-existingbrokenLinkLoopN)r+   joinpathr@   )r   ps   &&r   create_hierarchyZipPathGround.create_hierarchy2   s   G,.ABL13FGL13FG$568KL$457KLAJJw/9AJJw/8AJJ|4i@AJJ|4nEAJJ'78:JKr   c                    VP                   P                  \        V4      R 4      ;_uu_ 4       p\        P                  ! VRR7      pVP                  4       uuRRR4       #   + '       g   i     R# ; i)rzutf-8)encodingN)r   openr(   r   TextIOWrapperreadr   rJ   fs   && r   readtextZipPathGround.readtext@   sG    ZZ__SVS))Q  W5A668 *)))s   (A!!A2	c                    VP                   P                  \        V4      R 4      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)rN   N)r   rP   r(   rR   rS   s   && r   	readbytesZipPathGround.readbytesE   s5    ZZ__SVS))Q668 *)))s   A		A	c                V    \        V4      R ,           pW!P                  P                  9   # )r/   )r(   r   
NameToInfo)r   rJ   path_strs   && r   isdirZipPathGround.isdirK   s"    q6C<::0000r   c                    VP                   P                  P                  \        V4      4      pVf   R# \        P
                  ! VP                  ^,	          4      '       * # NFr   r[   getr(   r4   r   r3   r   rJ   infos   && r   isfileZipPathGround.isfileO   sE    zz$$((Q0<<< 2 2b 8999r   c                    VP                   P                  P                  \        V4      4      pVf   R# \        P
                  ! VP                  ^,	          4      # r`   ra   rc   s   && r   islinkZipPathGround.islinkU   sB    zz$$((Q0<||D.."455r   r   Nr0   )r   )__name__
__module____qualname____firstlineno__can_symlinkr   r   r$   r+   r8   r@   rK   rU   rX   readlinkr]   re   rh   __static_attributes____classdictcell____classdict__s   @r   r   r      sT     K!J0-:
L
 H1:6 6r   r   c                   N   a  ] tR t^\t o RtRR ltRR ltRR ltR tR t	Rt
V tR# )	MissingZipPathInfoc                    R # F r   follow_symlinkss   &&r   existsMissingZipPathInfo.existsb       r   c                    R # rx   ry   rz   s   &&r   is_dirMissingZipPathInfo.is_dire   r~   r   c                    R # rx   ry   rz   s   &&r   is_fileMissingZipPathInfo.is_fileh   r~   r   c                    R # rx   ry   r   s   &r   
is_symlinkMissingZipPathInfo.is_symlinkk   r~   r   c                    V # r   ry   r   s   &r   resolveMissingZipPathInfo.resolven   s    r   ry   NT)rk   rl   rm   rn   	__slots__r|   r   r   r   r   rq   rr   rs   s   @r   rv   rv   \   s*      I r   rv   c                   \   a  ] tR t^ut o R	tR
R ltRR ltRR ltRR ltR t	RR lt
RtV tR# )ZipPathInfoNc                P    Wn         R V n        T;'       g    T V n        / V n        R # r   r   r7   parentchildren)r   r   r   s   &&&r   r   ZipPathInfo.__init__{   s"     nnr   c                ~    V'       d5   V P                  4       '       d   V P                  4       P                  4       # R # r   )r   r   r|   rz   s   &&r   r|   ZipPathInfo.exists   s)    t00<<>((**r   c                V   V'       d5   V P                  4       '       d   V P                  4       P                  4       # V P                  f   R# \	        V P                  P
                  ^,	          4      ;p'       d   \        V4      # V P                  P                  P                  R4      # )NTr/   )	r   r   r   r7   r   r3   r   filenameendswithr   r{   fmts   && r   r   ZipPathInfo.is_dir   sw    t00<<>((**]]"4==66"<==S=3<==))22377r   c                `   V'       d5   V P                  4       '       d   V P                  4       P                  4       # V P                  f   R# \	        V P                  P
                  ^,	          4      ;p'       d   \        V4      # V P                  P                  P                  R4      '       * # )NFr/   )	r   r   r   r7   r   r3   r   r   r   r   s   && r   r   ZipPathInfo.is_file   sz    t00<<>))++]]"4==66"<==S=3<}}--66s;;;r   c                    V P                   f   R# \        V P                   P                  ^,	          4      ;p'       d   \        V4      # R# r`   )r7   r   r3   r   )r   r   s   & r   r   ZipPathInfo.is_symlink   s;    == 4==66"<==S=3<r   c                   ^ pV'       d   VP                  R4      RRR1,          M. pT p VP                  4       '       d   V'       g	   V'       d   V^,          pV^(8  d   \        # VP                  P	                  VP
                  4      P                  4       pYQ'       d   VP                  R4      RRR1,          M. ,          pVP                  pV'       d   VP                  4       pMV# VR8X  d   VP                  pK  V'       g   K  VR8w  g   K  WvP                  9  d3   V'       d%   \        VP                  V4      VP                  V&   M\        # VP                  V,          pEKB  )r   r/   Nz...)splitr   missing_zip_path_infor   rR   r7   decoder   popr   r   )r   r)   creater{   
link_countstackrd   names   &&&&    r   r   ZipPathInfo.resolve   s    
)-

3"%2  oa
#00}}))$--8??A$C2.B>{{yy{t|{{$#+}},.9$--.Nd+44}}T*r   )r   r   r   r7   r   r   r   )NFT)rk   rl   rm   rn   r   r   r|   r   r   r   r   rq   rr   rs   s   @r   r   r   u   s/      ?I
8<&+ &+r   r   c                   <   a  ] tR t^t o RtR tR tR tR tRt	V t
R# )ZipFileListc                |    \        V4      V n        . V n        VP                   F  pV P	                  V4       K  	  R # r   )r   tree_itemsfilelistappend)r   r   items   && r   r   ZipFileList.__init__   s1    )	%%DKK &r   c                ,    \        V P                  4      # r   )lenr   r   s   &r   __len__ZipFileList.__len__   s    4;;r   c                ,    \        V P                  4      # r   )iterr   r   s   &r   __iter__ZipFileList.__iter__   s    DKK  r   c                    V P                   P                  V4       WP                  P                  VP                  R R7      n        R# )T)r   N)r   r   r   r   r   r7   )r   r   s   &&r   r   ZipFileList.append   s2    4 AE		$--5>r   )r   r   N)r   r   )rk   rl   rm   rn   r   r   r   r   r   rq   rr   rs   s   @r   r   r      s'      #I !F Fr   r   c                   r   a  ] tR t^t o Rt]tR tR tR t	R t
R tR t]R 4       tRR ltR	 tR
 tRtV tR# )ReadableZipPathc                   W n         Wn        \        VP                  \        4      '       g   \	        V4      Vn        R # R # r   )	_segmentsr   
isinstancer   r   r   r   pathsegmentss   &$*r   r   ReadableZipPath.__init__   s1    % (++[99 +H 5H :r   c                B    \        \        V 4      V P                  34      # r   hashr(   r   r   s   &r   __hash__ReadableZipPath.__hash__       SY.//r   c                    \        V\        4      '       g   \        # \        V 4      \        V4      8H  ;'       d    V P                  VP                  J # r   )r   r   NotImplementedr(   r   r   others   &&r   __eq__ReadableZipPath.__eq__   =    %11!!4yCJ&JJ4==ENN+JJr   c                r    V P                   '       g   R # V P                  P                  ! V P                   !  # rj   r   parserjoinr   s   &r   __str__ReadableZipPath.__str__   '    ~~~{{00r   c                h    \        V 4      P                   R \        V 4      : RV P                  : R2# (z, zip_file=)typerk   r(   r   r   s   &r   __repr__ReadableZipPath.__repr__   0    t*%%&aD	}K?PPQRRr   c                8    \        V 4      ! VR V P                  / # r   r   r   r   r   s   &*r   with_segmentsReadableZipPath.with_segments      Dz<@$--@@r   c                z    V P                   P                  P                  pVP                  \	        V 4      R R7      # )F)r{   )r   r   r   r   r(   )r   r   s   & r   rd   ReadableZipPath.info  s.    }}%%**||CIu|==r   c                F   V P                   P                  4       pVP                  4       '       g   \        \        P
                  R V 4      hVP                  4       '       d   \        \        P                  RV 4      hV P                  P                  VP                  R4      # )File not foundzIs a directoryrN   )rd   r   r|   FileNotFoundErrorerrnoENOENTr   IsADirectoryErrorEISDIRr   rP   r7   )r   	bufferingrd   s   && r   __open_rb__ReadableZipPath.__open_rb__
  sm    yy  "{{}}#ELL2BDII[[]]#ELL2BDII}}!!$--55r   c                (  a  S P                   P                  4       pVP                  4       '       g   \        \        P
                  R S 4      hVP                  4       '       g   \        \        P                  RS 4      hV 3R lVP                   4       # )r   zNot a directoryc              3   6   <"   T F  pSV,          x  K  	  R # 5ir   ry   ).0r   r   s   & r   	<genexpr>*ReadableZipPath.iterdir.<locals>.<genexpr>  s     6ts   )
rd   r   r|   r   r   r   r   NotADirectoryErrorENOTDIRr   r   rd   s   f r   iterdirReadableZipPath.iterdir  sb    yy  "{{}}#ELL2BDII$U]]4EtLL666r   c                b   V P                   pVP                  4       '       g   \        \        P                  R V 4      hVP                  4       '       g   \        \        P                  RV 4      hV P                  V P                  P                  VP                  4      P                  4       4      # )r   zNot a symlink)rd   r|   r   r   r   r   OSErrorEINVALr   r   rR   r7   r   r   s   & r   rp   ReadableZipPath.readlink  sw    yy{{}}#ELL2BDII""%,,>>!!$--"4"4T]]"C"J"J"LMMr   r   r   Nr   )rk   rl   rm   rn   r   	posixpathr   r   r   r   r   r   r   propertyrd   r   r   rp   rq   rr   rs   s   @r   r   r      s\     
 *IF60K
1
SA > >67N Nr   r   c                   j   a  ] tR tRt o Rt]tR tR tR t	R t
R tR tRR ltRR	 ltRR
 ltRtV tR# )WritableZipPathi#  c                   W n         Wn        R # r   r  r   s   &$*r   r   WritableZipPath.__init__+  s    % r   c                B    \        \        V 4      V P                  34      # r   r   r   s   &r   r   WritableZipPath.__hash__/  r   r   c                    \        V\        4      '       g   \        # \        V 4      \        V4      8H  ;'       d    V P                  VP                  J # r   )r   r
  r   r(   r   r   s   &&r   r   WritableZipPath.__eq__2  r   r   c                r    V P                   '       g   R # V P                  P                  ! V P                   !  # rj   r   r   s   &r   r   WritableZipPath.__str__7  r   r   c                h    \        V 4      P                   R \        V 4      : RV P                  : R2# r   r   r   s   &r   r   WritableZipPath.__repr__<  r   r   c                8    \        V 4      ! VR V P                  / # r   r   r   s   &*r   r   WritableZipPath.with_segments?  r   r   c                L    V P                   P                  \        V 4      R 4      # )r   )r   rP   r(   )r   r   s   &&r   __open_wb__WritableZipPath.__open_wb__B  s    }}!!#d)S11r   c                4   \         P                  ! \        V 4      R ,           4      pV;P                  \        P
                  ^,          ,          un        V;P                  \        P                  ,          un        V P                  P                  VR4       R# r.   r1   )r   modezinfos   && r   mkdirWritableZipPath.mkdirE  s]    D	C0t||r11t<<<ub)r   c                   \         P                  ! \        V 4      4      p\        P                  ^,          Vn        V'       d   V;P
                  ^,          un        V P                  P                  V\        V4      4       R# r;   )r   r2   r(   r4   r=   r3   r   r'   )r   r?   target_is_directoryr  s   &&& r   
symlink_toWritableZipPath.symlink_toK  sQ    D	*"llb04'uc&k2r   r  Nr  )i  rx   )rk   rl   rm   rn   r   r  r   r   r   r   r   r   r   r  r  r!  rq   rr   rs   s   @r   r
  r
  #  sF     
 *IF!0K
1
SA2*3 3r   r
  )r   r   r  r4   r   r   r   r   r   r0   r   pathlib_abcr   r	   r
   pathlib.typesr   rv   r   r   r   r   r
  ry   r   r   <module>r%     s     	    2 2 
BBDDA6 A6H , +, S+( S+lF F2<Nm <N~-3m -3r   