o
    h                     @   sf   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ e	 dd Z
ej	dd ZdS )    N)CachingFileSystemc               	   c   s|    t d} | j  | j  | jd z| V  W | j  | j  | jd dS | j  | j  | jd w )z0
    Fixture providing a memory filesystem.
    memory N)fsspec
filesystemstoreclearpseudo_dirsappend)m r   c/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/fsspec/conftest.pyr      s   






r   c                 c   s   t d ddlm} |  t  t| }ttj	
|dd}|dd  W d   n1 s4w   Y  ttjd	dd
|dddddg
}z$td dV  W |  |  zt|  W dS  tym   Y dS w |  |  zt|  W w  ty   Y w w )z6
    Fixture providing a writable FTP filesystem.
    	pyftpdlibr   )FTPFileSystemoutwbs   helloi'  Nz-mz-dz-uuserz-Ppassz-w   )	localhostiI  r   r   )pytestimportorskipfsspec.implementations.ftpr   clear_instance_cacher   stropenospathjoinwrite
subprocessPopensys
executabletimesleep	terminatewaitshutilrmtree	Exception)tmpdirr   dfPr   r   r   ftp_writable   s:   

r/   )r   r(   r    r"   r$   r   r   fsspec.implementations.cachedr   fixturer   r/   r   r   r   r   <module>   s    
