+
    &j"                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIHtHtHtHt R tRs ! R R	]4      t]! R
. RO4       ! R R]P,                  4      4       t ! R R]4      tR# )    N)suppress)cached_propertywraps)parse_qs)AbstractFileSystem)"get_package_version_without_importinfer_storage_optionsmirror_fromtokenizec                 0   a  \        S 4      V 3R  l4       pV# )c                     <  S! V / VB #   \          d_   pTP                  '       g   h TP                  vr0\        T\        4      '       d#   R T9   d   \	        \
        P                  T4      Thh Rp?ii ; i)zdoes not existN)OSErrorargs
isinstancestrFileNotFoundErrorerrnoENOENT)r   kwargs	exceptionmessagefuncs   *,  t/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/fsspec/implementations/arrow.pywrapper wrap_exceptions.<locals>.wrapper   sj    
	((( 	>>>&^^NG'3'',<,G'g>IM	s    A4AA//A4)r   )r   r   s   f r   wrap_exceptionsr      s     
4[  N    c                   B  a a ] tR t^(t oRtRtV 3R lt]R 4       t]	R 4       t
]R 4       tRR ltR tR	 tR
 t]R 4       t]R 4       t]R 4       t]RR l4       t]RR l4       t]RR l4       t]RR l4       t]R 4       t]R 4       tRV 3R lltV 3R ltRtVtV ;t# )ArrowFSWrapperzgFSSpec-compatible wrapper of pyarrow.fs.FileSystem.

Parameters
----------
fs : pyarrow.fs.FileSystem

/c                J   < \        R 4      sWn        \        SV `  ! R/ VB  R# )pyarrowN )r   PYARROW_VERSIONfssuper__init__)selfr%   r   	__class__s   &&,r   r'   ArrowFSWrapper.__init__3   s"    <YG"6"r   c                .    V P                   P                  # N)r%   	type_namer(   s   &r   protocolArrowFSWrapper.protocol9   s    ww   r   c                x    R \        V P                  P                  V P                  P                  4      ,           # )hdfs_)r   r%   hostportr.   s   &r   fsidArrowFSWrapper.fsid=   s$    $'',,===r   c                n    \        V4      pVR ,          pVP                  R4      '       d
   VR,          pV# )pathz//:   NN)r	   
startswith)clsr8   opss   && r   _strip_protocolArrowFSWrapper._strip_protocolA   s2    #D)6{??4  8Dr   c                ^   V P                  V4      p^ RIHp  V P                  P	                  V! V4      4       Uu. uF  pV P                  V4      NK  	  ppV'       d   V# V Uu. uF  qUR,          NK  	  up# u upi   \        \        3 d    T P                  ! T3/ TB .p LNi ; iu upi )r   )FileSelectorname)	r=   
pyarrow.fsr@   r%   get_file_info_make_entryr   NotADirectoryErrorinfo)r(   r8   detailr   r@   entryentriess   &&&,   r   lsArrowFSWrapper.lsJ   s    ##D)+	2 "WW22<3EFFE   'F   N/67we&MMw77 "#56 	2yy001G	2
 8s(   #A? A:A? &B*:A? ?%B'&B'c                    V P                  V4      pV P                  P                  V.4      w  pV P                  V4      # r,   )r=   r%   rC   rD   )r(   r8   r   rF   s   &&, r   rF   ArrowFSWrapper.infoZ   s;    ##D)&&v.%%r   c                p    V P                  V4      p V P                  V4       R #   \         d     R# i ; i)TF)r=   rF   r   r(   r8   s   &&r   existsArrowFSWrapper.exists_   s;    ##D)	IIdO  ! 		s   & 55c                   ^ RI Hp VP                  VP                  J d   RpMVP                  VP                  J d   RpMcVP                  VP
                  J dH   \        \        P                  \        P                  ! \        P                  4      VP                  4      hRpRVP                  RVP                  RVRVP                  /# )	r   )FileType	directoryfileotherrA   sizetypemtime)rB   rS   rX   	DirectoryFileNotFoundr   r   r   osstrerrorr8   rW   rY   )r(   rF   rS   kinds   &&  r   rD   ArrowFSWrapper._make_entryh   s    '99***DYY(--'DYY(+++#ELL"++ell2KTYYWWD DIIDIIDTZZ	
 	
r   c           
        V P                  V4      P                  R 4      pV P                  V4      P                  R 4      pV P                  VR4      ;_uu_ 4       pV R\        P                  ! ^4       2p V P                  VR4      ;_uu_ 4       p\        P                  ! WF4       RRR4       V P                  P                  WR4        RRR4       R#   + '       g   i     L6; i  \         dQ    \        \        4      ;_uu_ 4        T P                  P                  T4       RRR4       h   + '       g   i     h ; ii ; i  + '       g   i     R# ; i)r    rbz.tmp.wbN)r=   rstrip_opensecrets	token_hexopenshutilcopyfileobjr%   moveBaseExceptionr   r   delete_file)r(   path1path2r   lstream	tmp_fnamerstreams   &&&,   r   cp_fileArrowFSWrapper.cp_file{   s   $$U+2237$$U+2237ZZt$$ 'w'8'8';&<=IYYy$//7&&w8 0Y. %$ 0/ ! /00GG''	2 1 10 %$$sN   E8C*C	)#C*C'"C**"ED1(	E1E<	EEE	c                    V P                  V4      P                  R 4      pV P                  V4      P                  R 4      pV P                  P                  W4       R# )r    N)r=   rd   r%   rk   )r(   rn   ro   r   s   &&&,r   mvArrowFSWrapper.mv   sH    $$U+2237$$U+2237U"r   c                ^    V P                  V4      pV P                  P                  V4       R # r,   )r=   r%   rm   rO   s   &&r   rm_fileArrowFSWrapper.rm_file   s$    ##D)D!r   c                
   V P                  V4      P                  R 4      pV P                  V4      '       d1   V'       d   V P                  P	                  V4       R# \        R4      hV P                  P                  V4       R# )r    z0Can't delete directories without recursive=FalseN)r=   rd   isdirr%   
delete_dir
ValueErrorrm   )r(   r8   	recursivemaxdepths   &&&&r   rmArrowFSWrapper.rm   s_    ##D)005::d""4( !STTGG%r   c                   VR 8X  d7   V'       d   V P                   P                  pMbV P                   P                  pMKVR8X  d   V P                   P                  pM-VR8X  d   V P                   P                  pM\        RV: 24      h/ pVR 8w  g	   V'       g0   \        \        P                  R4      ^ ,          4      ^8  d   RVR&   V! V3/ VB p\        WWV3/ VB # )rb   rc   abz'unsupported mode for Arrow filesystem: .Ncompression)
r%   open_input_fileopen_input_streamopen_output_streamopen_append_streamr~   intr$   split	ArrowFile)	r(   r8   mode
block_sizeseekabler   method_kwargsstreams	   &&&&&,   r   re   ArrowFSWrapper._open   s    4<0022T\WW//FT\WW//FFthOPP4<x?((-a01Q6)-&((t:HHHr   c                    V P                  V4      pV'       d   V P                  VR R7       R# V P                  P                  VRR7       R# )T)exist_okFr   N)r=   makedirsr%   
create_dir)r(   r8   create_parentsr   s   &&&,r   mkdirArrowFSWrapper.mkdir   s<    ##D)MM$M.GGtu5r   c                b    V P                  V4      pV P                  P                  VR R7       R# )Tr   N)r=   r%   r   )r(   r8   r   s   &&&r   r   ArrowFSWrapper.makedirs   s)    ##D)440r   c                ^    V P                  V4      pV P                  P                  V4       R # r,   )r=   r%   r}   rO   s   &&r   rmdirArrowFSWrapper.rmdir   s$    ##D)4 r   c                n    V P                  V4      pV P                  P                  V4      P                  # r,   )r=   r%   rC   rY   rO   s   &&r   modifiedArrowFSWrapper.modified   s-    ##D)ww$$T*000r   c                X   < VP                  R VR9  4       \        SV `  ! V3RRRR/VB # )r   Nstartend)Nr   )
setdefaultr&   cat_file)r(   r8   r   r   r   r)   s   &&&&,r   r   ArrowFSWrapper.cat_file   s7    *e9&<=wEDEdEfEEr   c                N   < VP                  R R4       \        SV `  ! W3/ VB  R# )r   FN)r   r&   get_file)r(   rpathlpathr   r)   s   &&&,r   r   ArrowFSWrapper.get_file   s%    *e,00r   )r%   )F)FN)rb   NT)T)NN) __name__
__module____qualname____firstlineno____doc__root_markerr'   propertyr/   r   r5   classmethodr=   rJ   rF   rP   rD   r   rs   rv   ry   r   re   r   r   r   r   r   r   __static_attributes____classdictcell____classcell__r)   __classdict__s   @@r   r   r   (   s,     K# ! ! > >  8 &

&   # #
 " " & & I I, 6 6 1 1 ! ! 1 1F1 1r   r   r   c                   F   a  ] tR t^t o RR ltR t]R 4       tR tRt	V t
R# )r   Nc                ^    W0n         W@n        Wn        W n        V;V n        V n        W`n        R # r,   )r8   r   r%   r   	blocksizer   r   )r(   r%   r   r8   r   r   r   s   &&&&&&,r   r'   ArrowFile.__init__   s)    		+55r   c                    V # r,   r#   r.   s   &r   	__enter__ArrowFile.__enter__   s    r   c                z    V P                   P                  4       '       d   V P                   P                  4       # R # r,   )r   r   rW   r.   s   &r   rW   ArrowFile.size   s+    ;;!!;;##%%r   c                "    V P                  4       # r,   )close)r(   r   s   &*r   __exit__ArrowFile.__exit__   s    zz|r   )r   r   r%   r   r   r8   r   r,   )r   r   r   r   r'   r   r   rW   r   r   r   )r   s   @r   r   r      s-       
 r   r   c                   N   a a ] tR t^t oRtRtRV 3R llt]R 4       tRt	Vt
V ;t# )HadoopFileSystemzYA wrapper on top of the pyarrow.fs.HadoopFileSystem
to connect it's interface with fsspechdfsc           	     T   < ^ RI Hp V! VVVVVVR7      p	\        S
V `  ! RRV	/VB  R# )a  

Parameters
----------
host: str
    Hostname, IP or "default" to try to read from Hadoop config
port: int
    Port to connect on, or default from Hadoop config if 0
user: str or None
    If given, connect as this username
kerb_ticket: str or None
    If given, use this ticket for authentication
replication: int
    set replication factor of file for write operations. default value is 3.
extra_conf: None or dict
    Passed on to HadoopFileSystem
)r   )r3   r4   userkerb_ticketreplication
extra_confr%   Nr#   )rB   r   r&   r'   )r(   r3   r4   r   r   r   r   r   r   r%   r)   s   &&&&&&&,  r   r'   HadoopFileSystem.__init__  s;    6 	0##!
 	)B)&)r   c                   \        V 4      p/ pVP                  R R4      '       d   VR ,          VR &   VP                  RR4      '       d   VR,          VR&   VP                  RR4      '       d   VR,          VR&   VP                  RR4      '       dG   \        VR,          4      pVP                  RR4      '       d   \        VR,          ^ ,          4      VR&   V# )r3   Nusernamer   r4   	url_queryr   )r	   getr   r   )r8   r<   outqueriess   &   r   _get_kwargs_from_urls&HadoopFileSystem._get_kwargs_from_urls*  s    #D)7764  f+CK77:t$$j/CK7764  f+CK77;%%s;/0G{{=$//%()?)B%CM"
r   r#   )defaultr   NN   N)r   r   r   r   r   r/   r'   staticmethodr   r   r   r   r   s   @@r   r   r      s0     - H%*N   r   r   )readseektellwritereadablewritabler   r   )r   ior]   rf   ri   
contextlibr   	functoolsr   r   urllib.parser   fsspec.specr   fsspec.utilsr   r	   r
   r   r   r$   r   IOBaser   r   r#   r   r   <module>r      s~     	 	    , ! * $ m1' m1` 			 0;~ ;r   