+
    &j)                        ^ RI Ht ^ RIt^ RIHtHt ^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ]P*                  ! R4      t ! R R]4      t ! R R]4      tR# )    )annotationsN)datetimetimezone)	ENOTEMPTY)BytesIO)PurePathPureWindowsPath)AnyClassVar)AbstractFileSystem)LocalFileSystem)stringify_pathzfsspec.memoryfsc                      ] tR t^t$ Rt/ tR]R&   R.tRtRt	]
R 4       tRR ltRR	 ltRR
 ltRR ltR tR tRR ltR tRR ltR tR tR tR tRR ltRtR# )MemoryFileSystemzA filesystem based on a dict of BytesIO objects

This is a global filesystem so instances of this class all point to the same
in memory filesystem.
zClassVar[dict[str, Any]]store memory/c                	b   \        V\        4      '       d8   \        V\        4      '       d   \        P                  ! V4      # \        V4      pVP                  R 4      pRV9   g   RV9   d   VP                  R4      # VP                  R4      P                  R4      pV'       d
   RV,           # R# )z	memory://z::z://r   r   )	
isinstancer   r	   r   _strip_protocolr   removeprefixrstriplstrip)clspaths   &&u/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/fsspec/implementations/memory.pyr    MemoryFileSystem._strip_protocol   s    dH%%$00&66t<<%d+  -4<5D=;;s##{{3&&s+!sTz)r)    c                	   V P                  V4      pWP                  9   d[   V'       g   V.# R VRV P                  V,          P                  RRRV P                  V,          P                  P	                  4       /.# \        4       pVR,           p. p\        V P                  4       EF  pVP                  V4      '       g   K  RV\        V4      R 9  d`   VP                  R VRV P                  V,          P                  RRRV P                  V,          P                  P	                  4       /4       K  \        V4      \        V4      8  g   K  WW\        V4      R P                  R^4      ^ ,          ,           pW9  g   K  T;'       g    . pVP                  R VR^ RR/4       VP                  V4       EK  	  V P                   F  pVP                  V4      '       g   K  RV\        V4      R 9  d3   Wt9  d+   VP                  R VR^ RR/4       VP                  V4       K_  Ka  WW\        V4      R P                  R^4      ^ ,          ,           pW9  g   K  VP                  R VR^ RR/4       VP                  V4       K  	  V'       g   WP                  9   d   . # \        V4      hV'       d   V# \        V U	u. uF  qR ,          NK  	  up	4      # u up	i )namesizetypefilecreatedr   N	directory)r   r   r"   r%   	timestampsettuple
startswithlenappendsplitaddpseudo_dirsFileNotFoundErrorsorted)
selfr   detailkwargspathsstarteroutp2ppathfs
   &&&,      r   lsMemoryFileSystem.ls+   s|   ##D)::v DDJJt,11Ftzz$/77AAC	  *

#B}}W%%bW00JJ"B"DJJrN$7$7"F%tzz"~'='='G'G'I	 Ws7|+#W&8&>&>sA&Fq&IIE)!iiR

 & & & 		%(1 $2 ""B}}W%%bW00

FB6;#OP		" '
 $W&8&>&>sA&Fq&IIE)

FE61fk#RS		%( # '''	#D))J#.#Qyy#.//.s    Kc                	~   V P                  V4      pWP                  9   g   WP                  9   d   \        V4      hV P	                  V4      P                  R 4      '       dA   V P                  V P	                  V4      4      '       d   \        V P	                  V4      4      hV'       dK   V P	                  V4      P                  R 4      '       d%    V P                  ! V P	                  V4      V3/ VB  V'       d0   WP                  9  d   V P                  P                  V4       R# R# R#   \         d     LFi ; ir   N)
r   r   r/   FileExistsError_parentstripisfileNotADirectoryErrormkdirr,   )r2   r   create_parentsr4   s   &&&,r   rD   MemoryFileSystem.mkdirk   s    ##D)::)9)9!9!$''<<##C((T[[d9K-L-L$T\\$%788dll4066s;;

4<<-~HH D 0 00##D) 14 # s   #D. .D<;D<c                	d     V P                  VR R7       R#   \         d    T'       g   h  R# i ; i)T)rE   N)rD   r?   )r2   r   exist_oks   &&&r   makedirsMemoryFileSystem.makedirsy   s1    	JJtDJ1 	 	s    ///c                B    VR8X  d   RMRpV P                  WVR7       R# )zCSet the bytes of given file

Avoids copies of the data if possible
createxbwb)modedataN)open)r2   r   valuerO   r4   s   &&&&,r   	pipe_fileMemoryFileSystem.pipe_file   s"    
 x'tT		$	.r   c                	    V P                  V4      pVR 8X  d   R# WP                  9   dF   V P                  V4      '       g   V P                  P                  V4       R# \	        \
        RV4      h\        V4      h)r   NzDirectory not empty)r   r/   r;   removeOSErrorr   r0   r2   r   s   &&r   rmdirMemoryFileSystem.rmdir   sd    ##D)2:###774==  ''-i)>EE#D))r   c                	0  a \         P                  R S4       V P                  S4      oSV P                  9   g   \        ;QJ dC    V3R l\        V P                  4      V P                  ,            4       F  '       g   K   RM8	  RM4! V3R l\        V P                  4      V P                  ,            4       4      '       d	   RSR^ RR/# SV P                  9   d3   V P                  S,          pRSRVP                  RRR	\        VR	R
4      /# \        S4      h)zinfo: %sc              3  R   <"   T F  qP                  SR ,           4      x  K  	  R# 5ir>   )r*   ).0pr   s   & r   	<genexpr>(MemoryFileSystem.info.<locals>.<genexpr>   s#      +
.QLL$$.Qs   $'TFr!   r"   r#   r&   r$   r%   N)
loggerdebugr   r/   anylistr   r"   getattrr0   )r2   r   r4   filelikes   &f, r   infoMemoryFileSystem.info   s    Z&##D)4###ss +
.24::.>AQAQ.Q+
sss +
.24::.>AQAQ.Q+
 (
 (
  
 TZZzz$'H78Y=	  $D))r   Nc                	   V P                  V4      pR V9   d   V P                  V4      '       d   \        hWP                  9   d   \	        V4      hTp\        V4      ^8  d6   V P                  V4      pV P                  V4      '       g   K:  \        V4      hVR9   d]   WP                  9   dB   V P                  V,          pRV9   d   VP                  ^ ^4       V# VP                  ^ 4       V# \        V4      hVR9   dd   R V9   d   V P                  V4      '       d   \        h\        WVP                  R4      4      p	V P                  '       g   V	P                  4        V	# V P                  P                   p
\#        RV
 RV: 24      h)xarP   zunsupported file mode for z: )rbabzr+bza+b>   rN   rM   w+bx+b)r   existsr?   r/   IsADirectoryErrorr+   r@   rB   r   seekr0   
MemoryFileget_intranscommit	__class____name__
ValueError)r2   r   rO   
block_size
autocommitcache_optionsr4   parentr:   mr!   s   &&&&&&,    r   _openMemoryFileSystem._open   sO    ##D)$;4;;t,,!!####D))&kAo\\&)F{{6""%f----zz!JJt$$;FF1aL  FF1I'--//d{t{{400%%4vzz&'9:A===
H>>**D9$r$JKKr   c                	   V P                  V4      pV P                  V4      pV P                  V4      '       d;   \        WV P                  V,          P	                  4       4      V P                  V&   R # V P                  V4      '       d0   W P                  9  d   V P                  P                  V4       R # R # \        V4      hN)	r   rB   rs   r   getvalueisdirr/   r,   r0   )r2   path1path2r4   s   &&&,r   cp_fileMemoryFileSystem.cp_file   s    $$U+$$U+;;u *TZZ.779!DJJu ZZ,,,  ''. - $E**r   c                	    \         P                  R V4       V P                  V4      p \        V P                  V,          P                  4       W# 4      #   \         d   p\        T4      ThRp?ii ; i)zcat: %sN)ra   rb   r   bytesr   	getbufferKeyErrorr0   )r2   r   startendr4   es   &&&&, r   cat_fileMemoryFileSystem.cat_file   sd    Y%##D)	1D)335e@AA 	1#D)q0	1s   +A A1 A,,A1c                	    V P                  V4      p V P                  V R #   \         d   p\        T4      ThR p?ii ; ir   )r   r   r   r0   r2   r   r   s   && r   _rmMemoryFileSystem._rm   s@    ##D)	1

4  	1#D)q0	1s   " >9>c                	    V P                  V4      p V P                  V,          P                  #   \         d   p\	        T4      ThR p?ii ; ir   )r   r   modifiedr   r0   r   s   && r   r   MemoryFileSystem.modified   sI    ##D)	1::d#,,, 	1#D)q0	1   0 AAAc                	    V P                  V4      p V P                  V,          P                  #   \         d   p\	        T4      ThR p?ii ; ir   )r   r   r%   r   r0   r   s   && r   r%   MemoryFileSystem.created   sI    ##D)	1::d#+++ 	1#D)q0	1r   c                	@    V P                  V4      pWP                  9   # r   )r   r   rX   s   &&r   rB   MemoryFileSystem.isfile   s    ##D)zz!!r   c                	   \        V\        4      '       d   V P                  V4      pMV Uu. uF  q@P                  V4      NK  	  ppV P                  WVR 7      p\	        V4       FW  pV P                  V4      '       d   V P                  V4       K-  V P                  V4      '       g   KF  V P                  V4       KY  	  R# u upi ))	recursivemaxdepthN)	r   strr   expand_pathreversedrB   rm_filerp   rY   )r2   r   r   r   r^   r5   s   &&&&  r   rmMemoryFileSystem.rm  s    dC  ''-D59:T((+TD:  X N%A{{1~~Q
 [[^^

1 ! ;s   C )T)F)	overwrite)rl   NTN)NN)FN)rx   
__module____qualname____firstlineno____doc__r   __annotations__r/   protocolroot_markerclassmethodr   r;   rD   rI   rS   rY   rg   r   r   r   r   r   r%   rB   r   __static_attributes__r   r   r   r   r      s     ')E#($KHK* *>0@*/**,(LT+1111" r   r   c                  X   a  ] tR tRtRtR
V 3R llt]R 4       tR tR t	R t
R tR	tV ;t# )rs   i  zA BytesIO which can't close and works as a context manager

Can initialise with data. Each path should only be active once at any moment.

No need to provide fs, path if auto-committing (default)
c                	H  < \         P                  R V4       Wn        W n        \        P
                  ! \        P                  R7      V n        \        P
                  ! \        P                  R7      V n	        V'       d#   \        SV `-  V4       V P                  ^ 4       R# R# )zopen file %stzN)ra   rb   fsr   r   nowr   utcr%   r   super__init__rr   )r2   r   r   rP   rw   s   &&&&r   r   MemoryFile.__init__  sc    ^T*	||x||4 5GT"IIaL r   c                	6    V P                  4       P                  # r   )r   nbytesr2   s   &r   r"   MemoryFile.size(  s    ~~&&&r   c                	    V # r   r   r   s   &r   	__enter__MemoryFile.__enter__,  s    r   c                	    R # r   r   r   s   &r   closeMemoryFile.close/      r   c                	    R # r   r   r   s   &r   discardMemoryFile.discard2  r   r   c                	    W P                   P                  V P                  &   \        P                  ! \
        P                  R 7      V n        R# )r   N)r   r   r   r   r   r   r   r   r   s   &r   rv   MemoryFile.commit5  s*    #'dii  5r   )r%   r   r   r   )NNN)rx   r   r   r   r   r   propertyr"   r   r   r   rv   r   __classcell__)rw   s   @r   rs   rs     s:     ' '6 6r   rs   )
__future__r   loggingr   r   errnor   ior   pathlibr   r	   typingr
   r   fsspecr   fsspec.implementations.localr   fsspec.utilsr   	getLoggerra   r   rs   r   r   r   <module>r      sP    "  '   -   % 8 '			,	-B) BJ!6 !6r   