§
    dŠtj¸5  ã                  óì   — d dl m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m	Z	m
Z
 ddlmZ ddlmZmZmZmZ i Z ej        d¦  «        Zd„ Zdd	„Z	 	 	 	 	 	 dd„Z G d„ de¦  «        Z	 dd„Zdd„Zd„ ZdS )é    )ÚannotationsNé   )ÚAsyncFileSystemÚ_run_coros_in_chunksÚsync_wrapper)ÚDEFAULT_CALLBACK)Ú
filesystemÚget_filesystem_classÚsplit_protocolÚ	url_to_fszfsspec.genericc                ó0   — t          | fi |¤Žt          | <   dS )z4Populate the dict used for method=="generic" lookupsN)r	   Ú_generic_fs)ÚprotocolÚstorage_optionss     úL/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/fsspec/generic.pyÚset_generic_fsr      s"   € å& xÐCÐC°?ÐCÐC…K�ÑÐÐó    c                ó¢  — t          | t          t          f¦  «        r| d         n| } |pt          | ¦  «        d         }|pi }|dk    rt	          |¦  «        S |dk    rt
          |         S |dk    r#t          |¦  «        }|                     ¦   «         S |dk    r&t          | fi | 	                    |i ¦  «        ¤Ž\  }}|S t          d|› �¦  «        ‚)zPick instance of backend FSr   ÚdefaultÚgenericÚcurrentÚoptionszUnknown FS resolution method: )Ú
isinstanceÚlistÚtupler   r	   r   r
   r   r   ÚgetÚ
ValueError)ÚurlÚmethodr   r   ÚclsÚfsÚ_s          r   Ú_resolve_fsr#      sè   € å˜s¥T­5 MÑ2Ô2Ð
;ˆ#ˆaŒ&ˆ&¸€CØÐ1�>¨#Ñ.Ô.¨qÔ1€HØ%Ð+¨€OØ�ÒÐÝ˜(Ñ#Ô#Ð#Ø�ÒÐÝ˜8Ô$Ð$Ø�ÒÐÝ" 8Ñ,Ô,ˆØ�{Š{‰}Œ}ÐØ�ÒÐÝ˜#ÐCÐC ×!4Ò!4°X¸rÑ!BÔ!BÐCÐC‰ˆˆAØˆ	Ý
Ð>°fÐ>Ð>Ñ
?Ô
?Ð?r   FÚsizeÚ	differentc                óè  ‡ ‡‡‡— |pt          di |pi ¤Ž}|                     ‰ ¦  «        Š |                     ‰¦  «        Š|                     ‰ dd¬¦  «        Š|                     ‰ ¦  «        st	          d¦  «        ‚|                     ‰dd¬¦  «        Šˆˆˆ fd„‰                     ¦   «         D ¦   «         }	t                               t          |	¦  «        › d�¦  «         |	r$| 	                    ˆˆ fd„|	D ¦   «         d¬¦  «         d„ ‰                     ¦   «         D ¦   «         Št                               t          ‰¦  «        › d	�¦  «         ˆˆˆ fd
„‰                     ¦   «         D ¦   «         }
‰ 
                    ¦   «                              ¦   «         D ]À\  }}|                     ‰ ‰¦  «        }|‰v rœ|dk    r|‰|<   Œ+|dk    r‰                     |¦  «         ŒG|dk    rmt          |¦  «        r ||¦  «        n||         }‰|         }t          |¦  «        r ||¦  «        n||         }||k    r|‰|<   Œ¥‰                     |¦  «         Œ»|‰|<   ŒÁt                               t          ‰¦  «        › d�¦  «         ‰r-t          ‰                     ¦   «         Ž \  }} |j        ||fi |¤Ž t                               t          |
¦  «        › d�¦  «         |r|
r|                     |
¦  «         ‰S )aU  Sync files between two directory trees

    (experimental)

    Parameters
    ----------
    source: str
        Root of the directory tree to take files from. This must be a directory, but
        do not include any terminating "/" character
    destination: str
        Root path to copy into. The contents of this location should be
        identical to the contents of ``source`` when done. This will be made a
        directory, and the terminal "/" should not be included.
    delete_missing: bool
        If there are paths in the destination that don't exist in the
        source and this is True, delete them. Otherwise, leave them alone.
    source_field: str | callable
        If ``update_field`` is "different", this is the key in the info
        of source files to consider for difference. Maybe a function of the
        info dict.
    dest_field: str | callable
        If ``update_field`` is "different", this is the key in the info
        of destination files to consider for difference. May be a function of
        the info dict.
    update_cond: "different"|"always"|"never"
        If "always", every file is copied, regardless of whether it exists in
        the destination. If "never", files that exist in the destination are
        not copied again. If "different" (default), only copy if the info
        fields given by ``source_field`` and ``dest_field`` (usually "size")
        are different. Other comparisons may be added in the future.
    inst_kwargs: dict|None
        If ``fs`` is None, use this set of keyword arguments to make a
        GenericFileSystem instance
    fs: GenericFileSystem|None
        Instance to use if explicitly given. The instance defines how to
        to make downstream file system instances from paths.

    Returns
    -------
    dict of the copy operations that were performed, {source: destination}
    T)ÚwithdirsÚdetailzCan only rsync on a directoryc                ób   •— g | ]+\  }}|d          dk    ¯|                      ‰‰¦  «        ‰v¯)|‘Œ,S )ÚtypeÚ	directory©Úreplace)Ú.0ÚaÚvÚdestinationÚ
otherfilesÚsources      €€€r   ú
<listcomp>zrsync.<locals>.<listcomp>c   sN   ø€ ð ð ð áˆAˆqØˆVŒ9˜Ò#Ð#¨¯	ª	°&¸+Ñ(FÔ(FÈjÐ(XÐ(Xð 	
à(XÐ(XÐ(Xr   z directories to createc                ó<   •— g | ]}|                      ‰‰¦  «        ‘ŒS © r,   )r.   Údirnr1   r3   s     €€r   r4   zrsync.<locals>.<listcomp>k   s'   ø€ Ð@Ð@Ð@°4ˆT�\Š\˜& +Ñ.Ô.Ð@Ð@Ð@r   ©Úexist_okc                ó2   — i | ]\  }}|d          dk    ¯||“ŒS ©r*   Úfiler6   )r.   r/   r0   s      r   ú
<dictcomp>zrsync.<locals>.<dictcomp>m   s,   € ÐIÐIÐI™˜˜A°Q°v´YÀ&Ò5HÐ5H��1Ð5HÐ5HÐ5Hr   z files to consider for copyc                ób   •— g | ]+\  }}|                      ‰‰¦  «        ‰v¯|d          dk    ¯)|‘Œ,S r;   r,   )r.   Úor0   Úallfilesr1   r3   s      €€€r   r4   zrsync.<locals>.<listcomp>o   sN   ø€ ð ð ð áˆAˆqØ�9Š9�[ &Ñ)Ô)°Ð9Ð9¸aÀ¼iÈ6Ò>QÐ>Qð 	
à>QÐ>QÐ>Qr   ÚalwaysÚneverr%   z files to copyz files to deleter6   )ÚGenericFileSystemÚ_strip_protocolÚfindÚisdirr   ÚitemsÚloggerÚdebugÚlenÚmake_many_dirsÚcopyr-   ÚpopÚcallableÚzipÚcpÚrm)r3   r1   Údelete_missingÚsource_fieldÚ
dest_fieldÚupdate_condÚinst_kwargsr!   ÚkwargsÚdirsÚ	to_deleteÚkr0   Ú	otherfileÚinf1Úv2Úinf2Úsource_filesÚtarget_filesr@   r2   s   ``                 @@r   Úrsyncra   (   sg  øøøø€ ðh 
Ð	7Õ Ð7Ð7 KÐ$5°2Ð7Ð7€BØ×Ò Ñ'Ô'€FØ×$Ò$ [Ñ1Ô1€KØ�wŠw�v¨°TˆwÑ:Ô:€HØ�8Š8�FÑÔð :ÝÐ8Ñ9Ô9Ð9Ø—’˜¨t¸D�ÑAÔA€Jðð ð ð ð ð à—N’NÑ$Ô$ðñ ô €Dõ
 ‡L‚L•C˜‘I”IÐ5Ð5Ð5Ñ6Ô6Ð6Øð 
Ø
×ÒØ@Ð@Ð@Ð@Ð@¸4Ð@Ñ@Ô@È4ð 	ñ 	
ô 	
ð 	
ð JÐI §¢Ñ!1Ô!1ÐIÑIÔI€HÝ
‡L‚L•C˜‘M”MÐ>Ð>Ð>Ñ?Ô?Ð?ðð ð ð ð ð à×$Ò$Ñ&Ô&ðñ ô €Ið
 —’‘”×%Ò%Ñ'Ô'ð $ð $‰ˆˆ1Ø—I’I˜f kÑ2Ô2ˆ	Ø˜
Ð"Ð"Ø˜hÒ&Ð&Ø'�˜‘�Ø Ò'Ð'Ø—’˜Q‘”��Ø Ò+Ð+Ý*2°<Ñ*@Ô*@ÐU�|�| A‘”�ÀaÈÄo�Ø 	Ô*�Ý)1°*Ñ)=Ô)=ÐQ�z�z "‘~”~�~À2ÀjÄ>�Ø˜4’<�<à"+�H˜Q‘K�Kð —L’L ‘O”O�Oøð $ˆH�Q‰KˆKÝ
‡L‚L•C˜‘M”MÐ1Ð1Ð1Ñ2Ô2Ð2Øð 4Ý%(¨(¯.ª.Ñ*:Ô*:Ð%;Ñ"ˆ�lØˆŒˆl˜LÐ3Ð3¨FÐ3Ð3Ð3Ý
‡L‚L•C˜	‘N”NÐ4Ð4Ð4Ñ5Ô5Ð5Øð ˜)ð Ø
�ŠˆiÑÔÐØ€Or   c                  ó®   ‡ — e Zd ZdZdZd#ˆ fd„	Zd„ Zd„ Zd$d	„Zd
„ Z		 d%d„Z
d„ Zd„ Zd„ Zd&d„Zd„ Zdedfd'd„Zd%d„Z ee¦  «        Z	 	 	 	 	 d(d)d"„Zˆ xZS )*rC   a^  Wrapper over all other FS types

    <experimental!>

    This implementation is a single unified interface to be able to run FS operations
    over generic URLs, and dispatch to the specific implementations using the URL
    protocol prefix.

    Note: instances of this FS are always async, even if you never use it with any async
    backend.
    r   r   Nc                óV   •— || _         || _         t          ¦   «         j        di |¤Ž dS )aÕ  

        Parameters
        ----------
        default_method: str (optional)
            Defines how to configure backend FS instances. Options are:
            - "default": instantiate like FSClass(), with no
              extra arguments; this is the default instance of that FS, and can be
              configured via the config system
            - "generic": takes instances from the `_generic_fs` dict in this module,
              which you must populate before use. Keys are by protocol
            - "options": expects storage_options, a dict mapping protocol to
              kwargs to use when constructing the filesystem
            - "current": takes the most recently instantiated version of each FS
        Nr6   )r   Úst_optsÚsuperÚ__init__)ÚselfÚdefault_methodr   rW   Ú	__class__s       €r   rf   zGenericFileSystem.__init__¡   s6   ø€ ð  %ˆŒØ&ˆŒØ�‰ŒÔÐ"Ð"˜6Ð"Ð"Ð"Ð"Ð"r   c                óŠ   — t          || j        | j        ¬¦  «        }|                     |                     |¦  «        ¦  «        S ©N©r   )r#   r   rd   Úunstrip_protocolÚ_parent©rg   Úpathr!   s      r   rn   zGenericFileSystem._parentµ   s:   € Ý˜˜tœ{¸D¼LÐIÑIÔIˆØ×"Ò" 2§:¢:¨dÑ#3Ô#3Ñ4Ô4Ð4r   c                óŠ   — t          || j        | j        ¬¦  «        }|                     |                     |¦  «        ¦  «        S rk   )r#   r   rd   rm   rD   ro   s      r   rD   z!GenericFileSystem._strip_protocol¹   s<   € å˜˜tœ{¸D¼LÐIÑIÔIˆØ×"Ò" 2×#5Ò#5°dÑ#;Ô#;Ñ<Ô<Ð<r   Fc              ‹  óf  K  — t          || j        | j        ¬¦  «        }|j        r |j        |f||ddœ|¤Žƒ d {V —†}n |j        |f||ddœ|¤Ž}i }|                     ¦   «         D ]8\  }	}
|
                     ¦   «         }
|                     |	¦  «        }||
d<   |
||<   Œ9|r|S t          |¦  «        S )Nrl   T)Úmaxdepthr'   r(   Úname)
r#   r   rd   Ú
async_implÚ_findrE   rG   rL   rm   r   )rg   rp   rs   r'   r(   rW   r!   ÚoutÚresultrZ   r0   rt   s               r   rv   zGenericFileSystem._find¾   s  è è € Ý˜˜tœ{¸D¼LÐIÑIÔIˆØŒ=ð 	Ø ˜œØðØ'°(À4ðð ØKQðð ð ð ð ð ð ð ˆCˆCð �"”'ØðØ'°(À4ðð ØKQðð ˆCð ˆØ—I’I‘K”Kð 	ð 	‰DˆAˆqØ—’‘”ˆAØ×&Ò& qÑ)Ô)ˆDØˆAˆf‰IØˆF�4‰LˆLØð 	ØˆMÝ�F‰|Œ|Ðr   c              ‹  óú   K  — t          || j        | j        ¬¦  «        }|j        r |j        |fi |¤Žƒ d {V —†}n |j        |fi |¤Ž}|                     ¦   «         }|                     |d         ¦  «        |d<   |S )Nrl   rt   )r#   r   rd   ru   Ú_infoÚinforL   rm   )rg   r   rW   r!   rw   s        r   rz   zGenericFileSystem._infoÒ   s›   è è € Ý˜˜dœk¸4¼<ÐHÑHÔHˆØŒ=ð 	)Ø ˜œ Ð/Ð/¨Ð/Ð/Ð/Ð/Ð/Ð/Ð/Ð/ˆCˆCà�"”'˜#Ð(Ð( Ð(Ð(ˆCØ�hŠh‰jŒjˆØ×)Ò)¨#¨f¬+Ñ6Ô6ˆˆF‰Øˆ
r   Tc              ‹  ó  K  — t          || j        | j        ¬¦  «        }|j        r |j        |fddi|¤Žƒ d {V —†}n |j        |fddi|¤Ž}d„ |D ¦   «         }|D ] }|                     |d         ¦  «        |d<   Œ!|r|S d„ |D ¦   «         S )Nrl   r(   Tc                ó6   — g | ]}|                      ¦   «         ‘ŒS r6   )rL   ©r.   r?   s     r   r4   z)GenericFileSystem._ls.<locals>.<listcomp>ç   s    € Ð%Ð%Ð%˜Aˆq�vŠv‰xŒxÐ%Ð%Ð%r   rt   c                ó   — g | ]
}|d          ‘ŒS )rt   r6   r~   s     r   r4   z)GenericFileSystem._ls.<locals>.<listcomp>í   s   € Ð+Ð+Ð+ !�A�f”IÐ+Ð+Ð+r   )r#   r   rd   ru   Ú_lsÚlsrm   )rg   r   r(   rW   r!   rw   r?   s          r   r€   zGenericFileSystem._lsÜ   sÚ   è è € õ ˜˜dœk¸4¼<ÐHÑHÔHˆØŒ=ð 	4Ø˜œ˜sÐ:Ð:¨4Ð:°6Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:ˆCˆCà�"”%˜Ð3Ð3 DÐ3¨FÐ3Ð3ˆCØ%Ð% Ð%Ñ%Ô%ˆØð 	7ð 	7ˆAØ×+Ò+¨A¨f¬IÑ6Ô6ˆAˆf‰IˆIØð 	,ØˆJà+Ð+ sÐ+Ñ+Ô+Ð+r   c              ‹  ó�   K  — t          || j        | j        ¬¦  «        }|j        r |j        |fi |¤Žƒ d {V —†S  |j        |fi |¤ŽS rk   )r#   r   rd   ru   Ú	_cat_fileÚcat_file)rg   r   rW   r!   s       r   rƒ   zGenericFileSystem._cat_fileï   sp   è è € õ
 ˜˜dœk¸4¼<ÐHÑHÔHˆØŒ=ð 	.Ø%˜œ cÐ4Ð4¨VÐ4Ð4Ð4Ð4Ð4Ð4Ð4Ð4Ð4à�2”;˜sÐ-Ð- fÐ-Ð-Ð-r   c              ‹  ó”   K  — t          || j        | j        ¬¦  «        }|j        r |j        ||fi |¤Žƒ d {V —†S  |j        ||fi |¤ŽS rk   )r#   r   rd   ru   Ú
_pipe_fileÚ	pipe_file)rg   rp   ÚvaluerW   r!   s        r   r†   zGenericFileSystem._pipe_fileú   st   è è € õ ˜˜tœ{¸D¼LÐIÑIÔIˆØŒ=ð 	7Ø&˜œ t¨UÐ=Ð=°fÐ=Ð=Ð=Ð=Ð=Ð=Ð=Ð=Ð=à�2”<  eÐ6Ð6¨vÐ6Ð6Ð6r   c              ‹  óØ   K  — |}t          |t          ¦  «        r|g}t          |d         | j        | j        ¬¦  «        }|j        r |j        |fi |¤Žƒ d {V —† d S  |j        |fi |¤Ž d S )Nr   rl   )r   Ústrr#   r   rd   ru   Ú_rmrQ   )rg   r   rW   Úurlsr!   s        r   r‹   zGenericFileSystem._rm  sœ   è è € ØˆÝ�d�CÑ Ô ð 	Ø�6ˆDÝ˜˜aœ $¤+¸t¼|ÐLÑLÔLˆØŒ=ð 	!Ø�"”&˜Ð(Ð( Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(àˆBŒE�#Ð Ð ˜Ð Ð Ð Ð Ð r   c              ƒ  óò   K  — t                                d|¦  «         t          || j        | j        ¬¦  «        }|j        r|                     ||¬¦  «        ƒ d {V —† d S |                     ||¬¦  «         d S )NzMake dir %srl   r8   )rH   rI   r#   r   rd   ru   Ú	_makedirsÚmakedirs)rg   rp   r9   r!   s       r   rŽ   zGenericFileSystem._makedirs  s†   è è € Ý�Š�] DÑ)Ô)Ð)Ý˜˜tœ{¸D¼LÐIÑIÔIˆØŒ=ð 	1Ø—,’,˜t¨h�,Ñ7Ô7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7à�KŠK˜ xˆKÑ0Ô0Ð0Ð0Ð0r   c                ó&   — t          ||fd| i|¤Ž dS )z[Sync files between two directory trees

        See `func:rsync` for more details.
        r!   N)ra   )rg   r3   r1   rW   s       r   ra   zGenericFileSystem.rsync  s'   € õ
 	ˆf�kÐ5Ð5 dÐ5¨fÐ5Ð5Ð5Ð5Ð5r   i   Útempdirú
str | Nonec           	   ‹  ó  K  — t          || j        | j        ¬¦  «        }t          || j        | j        ¬¦  «        }||u r+|j        r |j        ||fi |¤Žƒ d {V —†S  |j        ||fi |¤ŽS t          ||g||g|dd¬¦  «        ƒ d {V —† d S )Nrl   r   Úraise©Úon_error)r#   r   rd   ru   Ú_copyrL   Úcopy_file_op)	rg   r   Úurl2Ú	blocksizeÚcallbackr‘   rW   r!   Úfs2s	            r   Ú_cp_filezGenericFileSystem._cp_file  sÎ   è è € õ ˜˜dœk¸4¼<ÐHÑHÔHˆÝ˜$ ¤¸T¼\ÐJÑJÔJˆØ�ˆ9ˆ9àŒ}ð 4Ø%˜RœX c¨4Ð:Ð:°6Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:à�r”w˜s DÐ3Ð3¨FÐ3Ð3Ð3Ý˜2 ˜u c¨D¨6°7¸AÈÐPÑPÔPÐPÐPÐPÐPÐPÐPÐPÐPÐPr   c              ƒ  óä   ‡‡K  — t          |d         | j        | j        ¬¦  «        Š‰j        r&ˆˆfd„|D ¦   «         }t	          |¦  «        ƒ d {V —† d S |D ]}‰                     |‰¬¦  «         Œd S )Nr   rl   c                ó>   •— g | ]}‰                      |‰¬ ¦  «        ‘ŒS )r8   )rŽ   )r.   Úur9   r!   s     €€r   r4   z5GenericFileSystem._make_many_dirs.<locals>.<listcomp>5  s)   ø€ ÐFÐFÐF¸A�R—\’\ !¨h�\Ñ7Ô7ÐFÐFÐFr   r8   )r#   r   rd   ru   r   r�   )rg   rŒ   r9   Úcorosr    r!   s     `  @r   Ú_make_many_dirsz!GenericFileSystem._make_many_dirs2  s¢   øøè è € Ý˜˜aœ $¤+¸t¼|ÐLÑLÔLˆØŒ=ð 	2ØFÐFÐFÐFÐFÀÐFÑFÔFˆEÝ& uÑ-Ô-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-àð 2ð 2�Ø—’˜A¨�Ñ1Ô1Ð1Ð1ð2ð 2r   ÚignoreÚpath1ú	list[str]Úpath2Ú	recursiveÚboolr–   rŠ   rs   ú
int | NoneÚ
batch_sizec           	   ‹  óš  K  — |rt          d¦  «        ‚t          |t          ¦  «        r|gn|}t          |t          ¦  «        r|gn|}t          || j        | j        ¬¦  «        }	t          || j        | j        ¬¦  «        }
|	|
u r+|	j        r |	j        ||fi |¤Žƒ d {V —†S  |	j        ||fi |¤ŽS t          |	||
||||¬¦  «        ƒ d {V —† d S )NzPlease use fsspec.generic.rsyncrl   r•   )
ÚNotImplementedErrorr   rŠ   r#   r   rd   ru   r—   rL   r˜   )rg   r¤   r¦   r§   r–   rs   rª   r‘   rW   r!   rœ   s              r   r—   zGenericFileSystem._copy=  s/  è è € ð ð 	IÝ%Ð&GÑHÔHÐHÝ% e­SÑ1Ô1Ð<���°uˆÝ% e­SÑ1Ô1Ð<���°uˆå˜ ¤¸T¼\ÐJÑJÔJˆÝ˜% ¤¸d¼lÐKÑKÔKˆà�ˆ9ˆ9ØŒ}ð 7Ø%˜RœX e¨UÐ=Ð=°fÐ=Ð=Ð=Ð=Ð=Ð=Ð=Ð=Ð=à�r”w˜u eÐ6Ð6¨vÐ6Ð6Ð6åØ��s˜E 7¨JÀð
ñ 
ô 
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
r   )r   N)NFF)T)F)r‘   r’   )Fr£   NNN)r¤   r¥   r¦   r¥   r§   r¨   r–   rŠ   rs   r©   rª   r©   r‘   r’   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   rf   rn   rD   rv   rz   r€   rƒ   r†   r‹   rŽ   ra   r   r�   r¢   r   rK   r—   Ú__classcell__)ri   s   @r   rC   rC   ’   sp  ø€ € € € € ð
ð 
ð €Hð#ð #ð #ð #ð #ð #ð(5ð 5ð 5ð=ð =ð =ð
ð ð ð ð(ð ð ð ð,ð ,ð ,ð ,ð&	.ð 	.ð 	.ð
7ð 
7ð 
7ð!ð !ð !ð1ð 1ð 1ð 1ð6ð 6ð 6ð Ø!Ø"ðQð Qð Qð Qð Qð&2ð 2ð 2ð 2ð "�\ /Ñ2Ô2€Nð  Ø Ø#Ø!%Ø"ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r   rC   é   r£   c              ƒ  óf  ‡ ‡‡K  — dd l }‰p|                     ¦   «         Š	 ˆ ˆˆfd„t          ||¦  «        D ¦   «         }t          ||d¬¦  «        ƒ d {V —†}	t	          j        ‰¦  «         n# t	          j        ‰¦  «         w xY w|dk    r|	S |dk    r|	D ]}
t          |
t          ¦  «        r|
‚Œd S d S )Nr   c                ó¤   •— g | ]L\  }}t          ‰|‰|t          j                             ‰t	          j        ¦   «         j        ¦  «        ¦  «        ‘ŒMS r6   )Ú_copy_file_opÚosrp   ÚjoinÚuuidÚuuid4Úhex)r.   Úu1Úu2Úfs1rœ   r‘   s      €€€r   r4   z copy_file_op.<locals>.<listcomp>d  sa   ø€ ð 	
ð 	
ð 	
ñ ��Bõ ØØØØÝ”—’˜W¥d¤j¡l¤lÔ&6Ñ7Ô7ñô ð	
ð 	
ð 	
r   T)rª   Úreturn_exceptionsÚreturnr”   )ÚtempfileÚmkdtemprO   r   ÚshutilÚrmtreer   Ú	Exception)r½   Úurl1rœ   r™   r‘   rª   r–   rÀ   r¡   rw   r?   s   ` ` `      r   r˜   r˜   ]  s)  øøøè è € ð €O€O€OàÐ+˜×)Ò)Ñ+Ô+€Gðð	
ð 	
ð 	
ð 	
ð 	
ð 	
õ ˜d D™/œ/ð	
ñ 	
ô 	
ˆõ )Ø˜j¸Dð
ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ˆõ 	Œ�gÑÔÐÐø�Œ�gÑÔÐÐøøøØ�8ÒÐØˆ
Ø	�WÒ	Ð	Øð 	ð 	ˆAÝ˜!�YÑ'Ô'ð Ø�ðð 
Ð	ð	ð 	s   ¡6A, Á,Bc              ƒ  óR  K  — | j         r|                      ||¦  «        ƒ d {V —† n|                      ||¦  «         |j         r|                     ||¦  «        ƒ d {V —† n|                     ||¦  «         t          j        |¦  «         t                               d||¦  «         d S )NzCopy %s -> %s; done)	ru   Ú	_get_fileÚget_fileÚ	_put_fileÚput_filer¶   ÚunlinkrH   rI   )r½   rÅ   rœ   r™   Úlocalr–   s         r   rµ   rµ   {  sÁ   è è € Ø
„~ð "Ø�mŠm˜D %Ñ(Ô(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(à�Š�T˜5Ñ!Ô!Ð!Ø
„~ð "Ø�mŠm˜E 4Ñ(Ô(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(à�Š�U˜DÑ!Ô!Ð!Ý„IˆeÑÔÐÝ
‡L‚LÐ&¨¨dÑ3Ô3Ð3Ð3Ð3r   c              ƒ  óB   K  — t          j        | ¦  «        r| ƒ d {V —†S | S )N)ÚinspectÚiscoroutine)Úcors    r   Úmaybe_awaitrÑ   ˆ  s0   è è € ÝÔ˜3ÑÔð ØˆyˆyˆyˆyˆyˆyÐàˆ
r   )NN)Fr$   r$   r%   NN)Nr²   r£   )r£   )Ú
__future__r   rÎ   Úloggingr¶   rÂ   r¸   Úasynr   r   r   Ú	callbacksr   Úcorer	   r
   r   r   r   Ú	getLoggerrH   r   r#   ra   rC   r˜   rµ   rÑ   r6   r   r   ú<module>rØ      s‚  ðØ "Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€Ø 	€	€	€	Ø €€€Ø €€€à EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EÐ EØ 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ Mà€Ø	ˆÔ	Ð+Ñ	,Ô	,€ðDð Dð Dð
@ð @ð @ð @ð* ØØØØØðgð gð gð gðTH
ð H
ð H
ð H
ð H
˜ñ H
ô H
ð H
ðX AIðð ð ð ð<
4ð 
4ð 
4ð 
4ðð ð ð ð r   