HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/virtualenv/util/path/__pycache__/_sync.cpython-310.pyc
o

3�hI�@s�ddlmZddlZddlZddlZddlZddlmZe�e	�Z
dd�Zdd�Zdd	�Z
d
d�Zdd
�Zdd�ZGdd�d�Zgd�ZdS)�)�annotationsN)�S_IWUSRcCs.|��st�dt|��t�t|��dSdS)Nzcreate folder %s)�exists�LOGGER�debug�str�os�makedirs)�path�r�E/usr/local/lib/python3.10/dist-packages/virtualenv/util/path/_sync.py�
ensure_dirs�r
cCsf||kr
d|��}t|��|��sdS|��r'|��s't�d|�t|�dSt�d|�|��dS)Nz#source and destination is the same zremove directory %szremove file %s)�
ValueErrorr�is_dir�
is_symlinkrr�safe_delete�unlink)�src�dest�msgrrr�ensure_safe_to_dos
rcCs2t||�t�dt||��|j||��d�dS)Nz
symlink %s)�target_is_directory)rrr�_Debug�
symlink_tor�rrrrr�symlink s
rcCsHt||�|��}|r
tntj}t�dt||��|t|�t|��dS)Nzcopy %s)	rr�copytree�shutil�copyrrrr)rrr�methodrrrr&s

rc	Cszt�|�D]5\}}}tj�|tj�||��}tj�|�s!t�|�|D]}tj�||�}tj�||�}t�||�q#qdS�N)	r�walkr
�join�relpath�isdirr	rr)	rr�root�_�files�dest_dir�name�src_f�dest_frrrr.s
��rcCs<dd�}tjdkrdnd|i}tjt|�fddi|��dS)NcSs(t�|tj�st�|t�||�dS�r )r�access�W_OK�chmodr)�funcr
�exc_inforrr�onerror:szsafe_delete.<locals>.onerror)���onexcr1�
ignore_errorsT)�sys�version_infor�rmtreer)rr1�kwargsrrrr9src@s eZdZd	dd�Zd
dd�ZdS)r�return�NonecCs||_||_dSr r)�selfrrrrr�__init__Fs
z_Debug.__init__rcCs$|j��rdnd�|j�d|j��S)Nz
directory �z to )rrr)r<rrr�__str__Js$z_Debug.__str__N)r:r;)r:r)�__name__�
__module__�__qualname__r=r?rrrrrEs
r)rrr
rrr)�
__future__r�loggingrrr6�statr�	getLoggerr@rr
rrrrrr�__all__rrrr�<module>s