Your IP : 18.226.187.232


Current Path : /opt/alt/python35/lib64/python3.5/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/distutils/__pycache__/dir_util.cpython-35.opt-2.pyc



���]b�@s�ddlZddlZddlmZmZddlmZiaddddd�Zddddd	�Z	ddddddd
d�Z
dd
�Zdddd�Zdd�Z
dS)�N)�DistutilsFileError�DistutilsInternalError)�logi��cCs�t|t�s"td|f��tjj|�}g}tjj|�sX|dkr\|Stjtjj	|��r{|Stjj
|�\}}|g}xK|r�|r�tjj|�r�tjj
|�\}}|jd|�q�Wx�|D]�}tjj||�}tjj	|�}	tj|	�r0q�|dkrLt
jd|�|s�ytj||�Wnftk
r�}
zF|
jtjko�tjj|�s�td||
jdf��WYdd}
~
XnX|j|�dt|	<q�W|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�errno�EEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�-/opt/alt/python35/lib64/python3.5/dir_util.py�mkpaths>	"
$-
r%cCsvt�}x6|D].}|jtjj|tjj|���qWx-t|�D]}t||d|d|�qOWdS)Nrr)�set�addr
rr�dirname�sortedr%)�base_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs
	
,r.cCs�ddlm}|r:tjj|�r:td|��ytj|�}	WnMtk
r�}
z-|rqg}	ntd||
jf��WYdd}
~
XnX|s�t	|d|�g}x(|	D] }tjj
||�}
tjj
||�}|jd�rq�|rntjj|
�rntj
|
�}|dkrHtjd||�|s^tj||�|j|�q�tjj|
�r�|jt|
|||||d|d	|��q�||
||||d|d	|�|j|�q�W|S)
Nr)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %srz.nfsrzlinking %s -> %sr)Zdistutils.file_utilr/r
rr
r�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�src�dstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr/�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r7csH
	)
r7cCs�xwtj|�D]f}tjj||�}tjj|�r`tjj|�r`t||�q|jtj|f�qW|jtj	|f�dS)N)
r
r0rrr
r3�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r>�s%r>cCs�|dkrtjd|�|r&dSg}t||�x�|D]�}y?|d|d�tjj|d�}|tkr�t|=Wq@tk
r�}ztjd||�WYdd}~Xq@Xq@WdS)Nrz'removing '%s' (and everything under it)rzerror removing %s: %s)	rrr>r
rrrr�warn)Z	directoryrrrA�cmdrr"r#r#r$�remove_tree�s

rEcCsItjj|�\}}|dd�tjkrE||dd�}|S)Nrr)r
r�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srH)r
rZdistutils.errorsrrZ	distutilsrrr%r.r7r>rErHr#r#r#r$�<module>s?D


?>