
    }Oi                    j    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dS )
zIn-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                  T    e Zd ZU dZdZ eej        j                  Zde	d<   ddZ
dS )ModifiedMemoryFileSystemz?In-memory filesystem implementation that uses its own protocol.)DUCKDB_INTERNAL_OBJECTSTOREztyping.Callable[[str], str]_strip_protocolobj#io.IOBase | BytesIOWrapper | objectpathstrreturnNonec                :   t          |d          rt          |d          sd}t          |          t          |t          j                  rt          |          }|                     |          }t          | ||                                          | j	        |<   dS )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)selfr   r   msgs       l/var/www/html/web/mlink/mlink_AI_Server/mlink-backend/venv/lib/python3.11/site-packages/duckdb/filesystem.pyadd_filez!ModifiedMemoryFileSystem.add_file   s    V$$ 	!f)=)= 	!<CC.. c2=)) 	& %%C##D))%dD#((**==
4    N)r   r   r   r   r   r   )__name__
__module____qualname____doc__protocolclassmethodr   r   __func____annotations__r    r    r   r
   r
      sW         II/H3>;?Q?a?j3k3kOkkkk	> 	> 	> 	> 	> 	>r    r
   )r$   
__future__r   r   typingfsspecr   fsspec.implementations.memoryr   r   bytes_io_wrapperr   r
   r)   r    r   <module>r/      s    
 # " " " " " 				  % % % % % % F F F F F F F F , , , , , ,> > > > >/ > > > > >r    