Your IP : 3.133.133.251


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

o

6��f��@s`	ddlZddlmZddlmZdddd�Zdd	d
�Z		ddd
�Z		ddd�Zdd�Z	dS)�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�@c
Cs�	d}d}z�zt|d�}Wnty"}z	td||jf��d}~wwtj�|�rFzt�|�WntyE}z	td||jf��d}~wwzt|d�}Wntyb}z	td||jf��d}~ww	z|�|�}Wnty�}z	td||jf��d}~ww|s�nz|�	|�Wnty�}z	td||jf��d}~wwqdW|r�|�
�|r�|�
�dSdS|r�|�
�|r�|�
�ww)	N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %sTzcould not read from '%s': %szcould not write to '%s': %s)�open�OSErrorr�strerror�os�path�exists�unlink�read�write�close)�src�dstZbuffer_sizeZfsrcZfdst�eZbuf�r�:/opt/alt/python310/lib64/python3.10/distutils/file_util.py�_copy_file_contentsst�����������������
�r�cCs�	ddlm}ddlm}	m}
m}m}tj�	|�st
d|��tj�|�r3|}
tj�|tj�
|��}ntj�|�}
|rN|||�sN|dkrJt�d|�|dfSzt|}Wn
tyatd|��w|dkr�tj�
|�tj�
|�kr{t�d|||
�nt�d|||�|r�|dfS|d	kr�tj�|�r�tj�||�s�zt�||�|dfWSty�Ynwn|d
kr�tj�|�r�tj�||�s�t�||�|dfSt||�|s�|r�t�|�}|r�t�|||	||
f�|r�t�||||��|dfS)Nr)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrrr
�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr
�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater+�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCs^��
��	

r5cCs�	ddlm}m}m}m}m}ddl}	|dkrt�d||�|r"|S||�s,t	d|��||�r:t
j�|||��}n||�rFt	d||f��|||��sTt	d||f��d}
zt
�
||�Wn(ty�}z|j\}}
||	jkrsd	}
n	t	d
|||
f��WYd}~nd}~ww|
r�t|||d�zt
�|�W|Sty�}z |j\}}
zt
�|�Wn	ty�Ynwt	d||||
f��d}~ww|S)
Nr)rr r!r#r$rzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r0zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr r!r#r$�errnorr)rrr
r"�renamer
�argsZEXDEVr5r)rrr0r1rr r!r#r$r6Zcopy_itrZnum�msgrrr�	move_file�sp����

�����
�
����
r:cCs>	t|d�}z|D]	}|�|d�q	W|��dS|��w)N�w�
)r	rr)�filename�contents�f�linerrr�
write_file�s
�rA)r)rrrNrr)rr)
rZdistutils.errorsrZ	distutilsrr&rr5r:rArrrr�<module>s �
3
�d
�?

?>