o
    QD©is  ã                   @  s@   d dl mZ d dlZddlmZ ddlmZ G dd„ deƒZdS )é    )ÚannotationsNé   )Úhelpers)ÚLoaderc                   @  s"   e Zd ZdZdd„ Zd	dd„ZdS )
ÚLocalLoaderzLocal loader implementation.c                 C  s@   | j jsJ ‚d}| j j}| |¡r| |dd¡}t |d¡}|S )Nzfile://Ú é   Úrb)ÚresourceÚnormpathÚ
startswithÚreplaceÚioÚopen)ÚselfÚschemeÚpathÚbyte_stream© r   úZ/var/www/Datamplify/venv/lib/python3.10/site-packages/frictionless/schemes/local/loader.pyÚread_byte_stream_create   s   
z#LocalLoader.read_byte_stream_creater   Ústrc                 C  s    | j jsJ ‚t || j j¡ d S )N)r
   r   r   Ú	move_file)r   r   r   r   r   Úwrite_byte_stream   s   zLocalLoader.write_byte_streamN)r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   	   s    r   )Ú
__future__r   r   r   r   Úsystemr   r   r   r   r   r   Ú<module>   s
    