
     i                    j    d dl mZ d dlZd dlmZ ddlmZ ej        rd dlmZ ddl	m
Z
 ddZdddZdS )    )annotationsN)PurePosixPath   )DirectoryNotEmpty)IO)FSfsr   pathstrc                    t          |          }t          d          }	 ||k    r6|                     |                                           |j        }||k    4dS dS # t          $ r Y dS w xY w)zRemove all empty parents./N)r   	removediras_posixparentr   )r	   r
   roots      j/srv/www/vhosts/g4struct/public_html/venv/lib/python3.11/site-packages/fontTools/misc/filesystem/_tools.pyremove_emptyr      s    DDdllLL)));D dllllll    s   :A 
A,+A,src_filer   dst_file
chunk_size
int | Nonec                v    |dn|| j         |j        }t          fdd          D ]} ||           dS )z*Copy data from one file object to another.Ni   c                                 pd S N )_chunk_sizereads   r   <lambda>z copy_file_data.<locals>.<lambda>!   s    dd;//74     )r   writeiter)r   r   r   r    chunkr   r   s        @@r   copy_file_datar#      sa    !+!3++K=DNE 77777>>  e r   )r	   r   r
   r   r   )r   r   r   r   r   r   )
__future__r   typingpathlibr   _errorsr   TYPE_CHECKINGr   _baser   r   r#   r   r   r   <module>r*      s    " " " " " "  ! ! ! ! ! ! & & & & & &	 	 	 	 	      r   