+
    &jw                     @    ^ RI t ^ RIt^ RIt^ RIHt  ! R R]4      tR# )    N)AbstractArchiveFileSystemc                      a a ] tR t^t oRtRtRtRtRRRR]P                  RR3V 3R llt
]V 3R	 l4       tR
 tR tR tR tRR ltRR ltRtVtV ;t# )ZipFileSystemzRead/Write contents of ZIP archive as a file-system

Keeps file object open while instance lives.

This class is pickleable, but not necessarily thread-safe
 zipFrNTc                  < \         S
V `  ! V 3/ VB  V\        R4      9  d   \        RV R24      hW n        \        V\        \        P                  34      '       d9   VR8X  d   Rp	M	VR,           p	\        P                  ! V3RV	RV/T;'       g    / B pW`n        Wn        VP                  4       V n        \        P                   ! V P                  VVVVR	7      V n        R
V n        R
# )a+  
Parameters
----------
fo: str or file-like
    Contains ZIP, and must exist. If a str, will fetch file using
    :meth:`~fsspec.open_files`, which must return one file exactly.
mode: str
    Accept: "r", "w", "a"
target_protocol: str (optional)
    If ``fo`` is a string, this value can be used to override the
    FS protocol inferred from a URL
target_options: dict (optional)
    Kwargs passed when instantiating the target FS, if ``fo`` is
    a string.
compression, allowZip64, compresslevel: passed to ZipFile
    Only relevant when creating a ZIP
rwazmode 'z' no understoodazr+bbmodeprotocol)r   compression
allowZip64compresslevelN)super__init__set
ValueErrorr   
isinstancestrosPathLikefsspecopenforce_zip_64of	__enter__fozipfileZipFiler   	dir_cache)selfr   r   target_protocoltarget_optionsr   r   r   kwargsm	__class__s   &&&&&&&&, r/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/fsspec/implementations/zip.pyr   ZipFileSystem.__init__   s    8 	((s5z!vdV?;<<	b3,--s{3J%49G9M9M2B ',,.??GG#!'
     c                @   < \         SV `  V4      P                  R 4      # )/)r   _strip_protocollstrip)clspathr(   s   &&r)   r.   ZipFileSystem._strip_protocolH   s      w&t,33C88r+   c                    \        V R 4      '       d   V P                  4        V =\        V R4      '       d>   \        V P                  R4      '       d    V P                  P	                  RRR4       R# R# R# )r   r   __exit__N)hasattrcloser   r   r4   r#   s   &r)   __del__ZipFileSystem.__del__M   sY    4JJL47477J#?#?GGT4. $@r+   c                :    V P                   P                  4        R# )z;Commits any write changes to the file. Done on ``del`` too.N)r   r6   r7   s   &r)   r6   ZipFileSystem.closeT   s    r+   c           
        V P                   e   V P                  \        R4      9   Ed#   V P                  P	                  4       pV P                  V P                  P                  4       4       Uu/ uF*  pVP                  R4      RVP                  R4      R^ RR/bK,  	  upV n         V F  p\        P                  P                   Uu/ uF  qD\        W4R 4      bK  	  ppTP                  RVP                  P                  R4      RVP                  RVP                  4       '       d   RMR/4       WPP                   VR,          &   K  	  R # R # u upi u upi )Nwar-   namesizetype	directoryfile)r"   r   r   r   infolist_all_dirnamesnamelistrstripr    ZipInfo	__slots__getattrupdatefilename	file_sizeis_dir)r#   filesdirnamezsfs   &     r)   	_get_dirsZipFileSystem._get_dirsX   s0   >>!TYY#d)%; HH%%'E  $11$((2C2C2EF  GG s#GNN3/AK& 
  GDN 5<__5N5NO5Nd++5NO

 1 1# 6

 -.qy)  &< Ps   /0EEc                @    V P                   P                  ! W3/ VB  R # N)r   writestr)r#   r1   valuer&   s   &&&,r)   	pipe_fileZipFileSystem.pipe_filep   s    $00r+   c                   V P                  V4      pR V9   dH   V P                  \        R4      9   d.   V P                  V4      '       d   \	        R4      h\        V4      hR V P                  9   d   RV9   d   \	        R4      hV P                  P                  WP                  R4      V P                  R7      pR V9   d.   V P                  V4      pVR,          Vn        VR,          Vn        V# )r   r=   z7ZipFS can only be open for reading or writing, not bothwr   )force_zip64r?   r>   )r.   r   r   existsOSErrorFileNotFoundErrorr   r   stripr   infor?   r>   )	r#   r1   r   
block_size
autocommitcache_optionsr&   outrb   s	   &&&&&&,  r)   _openZipFileSystem._opent   s     ##D)$;499D	1{{4  WXX#D))$))tSTThhmmD**S/t?P?PmQ$;99T?DF|CHF|CH
r+   c                   Ve   V^8  d   \        R4      hR R lp\        V\        4      '       g   \        V4      pVP                  R4      pV! V4      p\	        V4      pV P                  4        / p	WP                  9   dB   V P                  V,          R,          R8X  d#   V P                  V,          W&   V'       d   V	# V.# V P                  P                  4        F  w  r\	        V! V
4      ;p4      V8  gM   \        ;QJ d%    R \        W|4       4       F  '       g   K   RM	  R	M! R \        W|4       4       4      '       d   Kk  VR,          R
8X  d$   V'       d   W9  d   WV
P                  R4      &   K  W9  g   K  V'       d   TMR W&   K  	  V'       dB   V	P                  4        UUu/ uF%  w  rVP                  R4      W(,           8  g   K#  WbK'  	  p	ppV'       d   V	# \        V	4      # u uppi )Nzmaxdepth must be at least 1c                $    V ^8  d   QhR\         /# )   _path)r   )formats   "r)   __annotate__(ZipFileSystem.find.<locals>.__annotate__   s     	K 	KC 	Kr+   c           	      j    \        \        R V P                  RR4      P                  R4      4      4      # )N\r-   )listfilterreplacesplit)rl   s   &r)   to_parts$ZipFileSystem.find.<locals>.to_parts   s*    tU]]4%=%C%CC%HIJJr+   r-   r@   rB   c              3   .   "   T F  w  rW8g  x  K  	  R # 5irV    ).0r   r   s   &  r)   	<genexpr>%ZipFileSystem.find.<locals>.<genexpr>   s      J#>41#>s   TFrA   )r   r   r   r/   lenrS   r"   itemsanyr   ra   countsorted)r#   r1   maxdepthwithdirsdetailr&   rv   
path_parts
path_depthresult	file_path	file_info
file_partskvs   &&&&&,         r)   findZipFileSystem.find   s   HqL:;;	K $$$t9D {{3d^
_
 >>!dnnT&:6&Bf&L>>$/FL#6/$/$(NN$8$8$: I)!44:5
Bcc J#&z#>Jccc J#&z#>J G G  K/	 73<9??3/0&17IT! %; !'!/1773<(BW3W    v3VF^3s   0 G3G3)r"   r   r   r   r   r   )rbNTN)NFF)__name__
__module____qualname____firstlineno____doc__root_markerr   cachabler    
ZIP_STOREDr   classmethodr.   r8   r6   rS   rY   rg   r   __static_attributes____classdictcell____classcell__)r(   __classdict__s   @@r)   r   r      su      KHH &&2h 9 9/.01.,4 ,4r+   r   )r   r    r   fsspec.archiver   r   ry   r+   r)   <module>r      s     	   4o4- o4r+   