Viewing File: /opt/hc_python/lib/python3.12/site-packages/virtualenv/util/path/__pycache__/_sync.cpython-312.pyc
�
`��gI � � � d dl mZ d dlZd dlZd dlZd dlZd dlmZ ej e � Z
d� Zd� Zd� Z
d� Zd� Zd � Z G d
� d� Zg d�Zy)
� )�annotationsN)�S_IWUSRc � � | j � s>t j dt | � � t j
t | � � y y )Nzcreate folder %s)�exists�LOGGER�debug�str�os�makedirs)�paths �I/opt/hc_python/lib/python3.12/site-packages/virtualenv/util/path/_sync.py�
ensure_dirr s3 � ��;�;�=����'��T��3�
���C��I�� � c � � | |k( rd| � �}t |� �|j � sy |j � r2|j � s"t j d|� t
|� y t j d|� |j � y )Nz#source and destination is the same zremove directory %szremove file %s)�
ValueErrorr �is_dir�
is_symlinkr r �safe_delete�unlink)�src�dest�msgs r
�ensure_safe_to_dor sl � �
�d�{�3�C�5�9����o���;�;�=���{�{�}�T�_�_�.����*�D�1��D�����%�t�,����
r c � � t | |� t j dt | |� � |j | | j � �� y )Nz
symlink %s)�target_is_directory)r r r �_Debug�
symlink_tor �r r s r
�symlinkr s7 � ��c�4� �
�L�L��v�c�4�0�1��O�O�C�S�Z�Z�\�O�:r c �� � t | |� | j � }|rt nt j }t
j
dt | |� � |t | � t |� � y )Nzcopy %s) r r �copytree�shutil�copyr r r r )r r r �methods r
r# r# &