Ë
    Þš§j4  ã                  ób   — d Z ddlmZ ddlZddlZddlmZ ddlmZm	Z	 ddl
mZ  G d„ d	e	«      Zy)
zŒIn-memory filesystem to store ephemeral dependencies.

Warning: Not for external use. May change at any moment. Likely to be made internal.
é    )ÚannotationsN)ÚAbstractFileSystem)Ú
MemoryFileÚMemoryFileSystemé   )ÚBytesIOWrapperc                  ó`   — e Zd ZU dZdZ eej                  j                  «      Zde	d<   dd„Z
y)ÚModifiedMemoryFileSystemz?In-memory filesystem implementation that uses its own protocol.)ÚDUCKDB_INTERNAL_OBJECTSTOREztyping.Callable[[str], str]Ú_strip_protocolc                ó
  — t        |d«      rt        |d«      sd}t        |«      ‚t        |t        j                  «      rt        |«      }| j                  |«      }t        | ||j                  «       «      | j                  |<   y)zAdd a file to the filesystem.ÚreadÚseekz(Can not read from a non file-like objectN)
ÚhasattrÚ	TypeErrorÚ
isinstanceÚioÚ
TextIOBaser   r   r   r   Ústore)ÚselfÚobjÚpathÚmsgs       úTC:\Users\Luka\AppData\Local\Temp\pip-target-o84fipzb\lib\python\duckdb/filesystem.pyÚadd_filez!ModifiedMemoryFileSystem.add_file   si   € ä˜˜VÔ$¬°°fÔ)=Ø<ˆCÜ˜C“.Ð Ü�cœ2Ÿ=™=Ô)ä  Ó%ˆCØ×#Ñ# DÓ)ˆÜ% d¨D°#·(±(³*Ó=ˆ�
‰
�4Òó    N)r   z#io.IOBase | BytesIOWrapper | objectr   ÚstrÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚprotocolÚclassmethodr   r   Ú__func__Ú__annotations__r   © r   r   r
   r
      s,   … ÙIà/€Há3>Ð?Q×?aÑ?a×?jÑ?jÓ3k€OÐ0Ókô	>r   r
   )r#   Ú
__future__r   r   ÚtypingÚfsspecr   Úfsspec.implementations.memoryr   r   Úbytes_io_wrapperr   r
   r(   r   r   Ú<module>r.      s+   ðñõ
 #ã 	Û å %ß Få ,ô>Ð/õ >r   