File: //usr/local/lib/python3.10/dist-packages/virtualenv/util/path/__pycache__/_sync.cpython-310.pyc
o
3�hI � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlmZ e�e �Z
dd� Zdd� Zdd � Z
d
d� Zdd
� Zdd� ZG dd� d�Zg d�ZdS )� )�annotationsN)�S_IWUSRc C s. | � � st�dt| �� t�t| �� d S d S )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
c C sf | |kr
d| � �}t |��|�� sd S |�� r'|�� s't�d|� t|� d S t�d|� |�� d S )Nz#source and destination is the same zremove directory %szremove file %s)�
ValueErrorr �is_dir�
is_symlinkr r �safe_delete�unlink)�src�dest�msgr r r �ensure_safe_to_do s
r c C s2 t | |� t�dt| |�� |j| | �� d� d S )Nz
symlink %s)�target_is_directory)r r r �_Debug�
symlink_tor �r r r r r �symlink s
r c C sH t | |� | �� }|r
tntj}t�dt| |�� |t| �t|�� d S )Nzcopy %s) r r �copytree�shutil�copyr r r r )r r r �methodr r r r &