Your IP : 3.145.44.46


Current Path : /opt/alt/python310/lib64/python3.10/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/distutils/__pycache__/dir_util.cpython-310.opt-2.pyc

o

6��fb�@sr	ddlZddlZddlmZmZddlmZiaddd�Zddd	�Z			dd
d�Z
dd
�Zddd�Zdd�Z
dS)�N)�DistutilsFileError�DistutilsInternalError)�log��cCst	t|t�s
td|f��tj�|�}g}tj�|�s|dkr!|St�tj�	|��r,|Stj�
|�\}}|g}|rY|rYtj�|�sYtj�
|�\}}|�d|�|rY|rYtj�|�rA|D]\}tj�||�}tj�	|�}	t�|	�rpq[|dkrzt
�d|�|s�zt�||�Wn)ty�}
z|
jtjkr�tj�|�s�td||
jdf��WYd}
~
nd}
~
ww|�|�dt|	<q[|S)Nz(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %s���)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�9/opt/alt/python310/lib64/python3.10/distutils/dir_util.py�mkpathsL

��
����

r%c	CsP	t�}|D]}|�tj�|tj�|���qt|�D]
}t||||d�qdS)N�rr)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs
�r.c
Cs\	ddlm}|stj�|�std|��zt�|�}	Wn ty<}
z|r)g}	n	td||
jf��WYd}
~
nd}
~
ww|sEt	||d�g}|	D]b}tj�
||�}
tj�
||�}|�d�r_qI|r�tj�|
�r�t�
|
�}|dkrwt�d||�|st�||�|�|�qItj�|
�r�|�t|
|||||||d	��qI||
||||||d	�|�|�qI|S)
Nr)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %s)rz.nfsrzlinking %s -> %sr&)Zdistutils.file_utilr/rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�srcZdstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr/�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r7csZ�����

���r7cCsh	t�|�D]#}tj�||�}tj�|�r!tj�|�s!t||�q|�tj|f�q|�tj	|f�dS)N)
rr0rrrr3�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�	|dkrt�d|�|rdSg}t||�|D]4}z|d|d�tj�|d�}|tvr2t|=WqtyL}z
t�d||�WYd}~qd}~wwdS)Nrz'removing '%s' (and everything under it)rzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s&
����rDcCs8	tj�|�\}}|dd�tjkr||dd�}|S)Nrr)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�s
rG)rrr)rrrrrr)rr)rrZdistutils.errorsrrZ	distutilsrrr%r.r7r=rDrGr#r#r#r$�<module>s

?
�E



?>