Your IP : 3.133.133.251
o
6��f� � @ s` d dl Z d dlmZ d dlmZ dddd�Zdd d
�Z ddd
�Z ddd�Zdd� Z dS )� N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym� @ c
C s� d }d }z�zt | d�}W n ty" } z td| |jf ��d }~ww tj�|�rFzt�|� W n tyE } z td||jf ��d }~ww zt |d�}W n tyb } z td||jf ��d }~ww z|�|�}W n ty� } z td| |jf ��d }~ww |s�nz|� |� W n ty� } z td||jf ��d }~ww qdW |r�|�
� |r�|�
� d S d S |r�|�
� |r�|�
� w w ) 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_contents st �����������������
�r � c C s� ddl m} ddlm} m}
m}m} tj� | �st
d| ��tj�|�r3|}
tj�|tj�
| ��}ntj�|�}
|rN|| |�sN|dkrJt�d| � |dfS zt| }W n
tya td| ��w |dkr�tj�
|�tj�
| �kr{t�d|| |
� nt�d|| |� |r�|dfS |d kr�tj�|�r�tj�| |�s�zt�| |� |dfW S ty� Y nw n|d
kr�tj�|�r�tj�| |�s�t�| |� |dfS t| |� |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 filer z"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %sr r )Zdistutils.dep_utilr �statr r r r r r
�isfiler �isdir�join�basename�dirnamer �debug�_copy_action�KeyError�
ValueError�infor �samefile�linkr
�symlinkr �utime�chmod)r r Z
preserve_modeZpreserve_times�updater+ �verbose�dry_runr r r r r �dir�action�str r r � copy_fileC s^ ��
��
r5 c C s� ddl m}m}m}m}m} dd l} |dkrt�d| |� |r"|S || �s,t d| ��||�r:t
j�||| ��}n||�rFt d| |f ��|||��sTt d| |f ��d}
zt
�
| |� W n( ty� } z|j\}}
|| jkrsd }
n t d
| ||
f ��W Y d }~nd }~ww |
r�t| ||d� zt
�| � W |S ty� } z |j\}}
zt
�|� W n ty� Y nw t d| || |
f ��d }~ww |S )
Nr )r r r! r# r$ r zmoving %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)r0 zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathr r r! r# r$ �errnor r) r r r
r"