+
    LV-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# )ÚMemoryFileSystemz”A 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   &&Ún/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/fsspec/implementations/memory.pyr   Ú MemoryFileSystem._strip_protocol   s�   € ä�dœH×%Ò%Ü˜$¤×0Ò0Ü&×6Ò6°tÓ<Ð<ä% dÓ+�à× Ñ  Ó-ˆØ�4Œ<˜5 Dœ=Ø—;‘;˜sÓ#Ð#Ø�{‰{˜3Ó×&Ñ& sÓ+ˆß!ˆs�T�zÐ) 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W„9  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W„9  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  q™R ,          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Ø˜DŸJ™J tÕ,×1Ñ1Ø˜FØ˜tŸz™z¨$Õ/×7Ñ7×AÑAÓCð	ðð ô “ˆØ˜•*ˆØˆÜ˜Ÿ
™
×#ˆBØ�}‰}˜W×%Ô%Ø˜b¤ W£ Ð0Ô0à—J‘Jà" BØ" D§J¡J¨r¥N×$7Ñ$7Ø" FØ% t§z¡z°"¥~×'=Ñ'=×'GÑ'GÓ'Ið	öô ˜“Wœs 7›|Ö+à#¬¨W«¨Ð&8×&>Ñ&>¸sÀAÓ&FÀqÕ&IÕI�EØÖ)Ø!Ÿi˜i R˜ØŸ
™
à &¨Ø &¨Ø &¨ðôð Ÿ	™	 %×(ñ1 $ð2 ×"Ô"ˆBØ�}‰}˜W×%Ô%Ø˜b¤ W£ Ð0Ô0à”ØŸ
™
 F¨B°¸¸6À;Ð#OÔPØŸ	™	 "žñ 'ð
 $¬¨W«¨Ð&8×&>Ñ&>¸sÀAÓ&FÀqÕ&IÕI�EØÖ)ØŸ
™
 F¨E°6¸1¸fÀkÐ#RÔSØŸ	™	 %Ö(ñ #÷ Ø×'Ñ'Ô'à�	Ü# DÓ)Ð)ßØˆJÜ©#Ó.©# Q˜—y�y©#Ñ.Ó/Ð/ùÒ.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¯[©[¸¿¹ÀdÓ9K×-LÒ-LÜ$ T§\¡\°$Ó%7Ó8Ð8ß˜dŸl™l¨4Ó0×6Ñ6°s×;Ò;ðØ—
’
˜4Ÿ<™<¨Ó-¨~ÑHÀÒH÷ �D× 0Ñ 0Ô0Ø×Ñ×#Ñ# DÖ)ñ 1‰4øô #ô Ùðú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   € ð	Ø�J‰J�t¨DˆJÖ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Ô'‰t¨TˆØ�	‰	�$¨ˆ	Ö.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Œ:áØ×#Ñ#Ô#Ø—7‘7˜4—=’=Ø× Ñ ×'Ñ'¨Ö-äœ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¨�L‰L˜ �×$Ð$Ó.Qùs   ƒ$'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×#Ñ#Ô#§s£sô +
Ü.2°4·:±:Ó.>À×AQÑAQÖ.Qó+
§s§s¢sô +
Ü.2°4·:±:Ó.>À×AQÑAQÖ.Qó+
÷ (
ò (
ð ˜Ø˜Ø˜ðð ð
 �T—Z‘ZÔØ—z‘z $Õ'ˆHà˜Ø˜Ÿ™Ø˜Øœ7 8¨Y¸Ó=ð	ð ô $ 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Ó)Ð)ØˆÜ�&‹k˜AŒoØ—\‘\ &Ó)ˆFØ�{‰{˜6×"Ô"Ü% fÓ-Ð-ØÐ-Ô-Ø—z‘zÔ!Ø—J‘J˜tÕ$�Ø˜$”;à—F‘F˜1˜a”Lð �ð —F‘F˜1”IØ�ä'¨Ó-Ð-ØÐ/Ô/Ø�dŒ{˜tŸ{™{¨4×0Ò0Ü%Ð%Ü˜4 v§z¡z°&Ó'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×ÒÜ *Ø˜TŸZ™Z¨Õ.×7Ñ7Ó9ó!ˆD�J‰J�uÓð �Z‰Z˜×ÒØ×,Ñ,Ô,Ø× Ñ ×'Ñ'¨Ö.ñ -ô $ 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Ó5°eÐ@ÓAÐAøÜô 	1Ü# DÓ)¨qÐ0ûð	1ús   ©+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ûð	1ús   “" ¢>­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ûð	1úr™   c                	ó@   € V P                  V4      pWP                  9   # r‚   )r   r   rX   s   &&r   rB   ÚMemoryFileSystem.isfileÿ   s   € Ø×#Ñ# DÓ)ˆØ—z‘zÑ!Ð!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™   € Ü�dœC× Ò Ø×'Ñ'¨Ó-‰Dá59Ó:±T°×(Ñ(¨Ö+±TˆDÐ:Ø× Ñ  À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  zÄA 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Ô"Ø�I‰I�aŽLñ 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*   € Ø#'�‰�‰�d—i‘iÑ Ü Ÿš¬¯©Ô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   