o
    iQ                     @  s   d dl mZ d dlZddlmZ ddlmZmZmZ ddl	m
Z
 ejr)ddlmZ dddZ		ddddZdddZdddZdS )    )annotationsN   )IllegalDestination)combinefrombaseisbase)copy_file_data)FSsrc_fsr	   src_pathstrdst_fsdst_pathc              	   C  s   | |u r||krt d|d| |d,}||d}t|| W d    n1 s-w   Y  W d    d S W d    d S 1 sEw   Y  d S )Ncannot copy 
 to itselfrbwb)r   openr   )r
   r   r   r   Zsrc_fileZdst_file r   n/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/fontTools/misc/filesystem/_copy.py	copy_file   s   "r   /src_rootdst_rootc                 C  s`   | |u rt ||rtd| d|j|dd | j|D ]}|jt|t||dd qd S )Nr   r   T)Zrecreate)r   r   makedirswalkdirsmakedirr   r   )r
   r   r   r   Zdir_pathr   r   r   copy_structure   s   r   c                 C  sB   t | ||| | j|D ]}t|t||}t| ||| qd S )N)r   r   filesr   r   r   )r
   r   r   r   	file_pathZ	copy_pathr   r   r   copy_dir$   s
   r!   c                 C  s   t | d|d d S )Nr   )r!   )r
   r   r   r   r   copy_fs,   s   r"   )r
   r	   r   r   r   r	   r   r   )r   r   )r
   r	   r   r	   r   r   r   r   )r
   r	   r   r	   )
__future__r   typing_errorsr   _pathr   r   r   Z_toolsr   TYPE_CHECKING_baser	   r   r   r!   r"   r   r   r   r   <module>   s    

