관리-도구
편집 파일: _sync.cpython-311.pyc
� �܋f� � �p � d dl Z d dlZd dlZd dlmZ d� Zd� Zd� Zd� Zd� Z d� Z G d � d � � Zg d�ZdS )� N)�S_IWUSRc � � | � � � sEt j dt | � � � � t j t | � � � � d S d S )Nzcreate folder %s)�exists�logging�debug�str�os�makedirs)�paths �k/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/virtualenv/util/path/_sync.py� ensure_dirr sQ � ��;�;�=�=� �� �(�#�d�)�)�4�4�4� ��C��I�I������� � c �P � | |k rt d| � �� � �|� � � sd S |� � � r:|� � � s&t j d|� � t |� � d S t j 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�dests r �ensure_safe_to_dor s� � � �d�{�{��D�s�D�D�E�E�E��;�;�=�=� ����{�{�}�}� �T�_�_�.�.� �� �+�T�2�2�2��D������� �&��-�-�-���� � � � � r c � � t | |� � t j dt | |� � � � |� | | � � � �� � d S )Nz symlink %s)�target_is_directory)r r r �_Debug� symlink_tor r s r �symlinkr sR � ��c�4� � � ��M�,��s�D� 1� 1�2�2�2��O�O�C�S�Z�Z�\�\�O�:�:�:�:�:r c � � t | |� � | � � � }|rt nt j }t j dt | |� � � � |t | � � t |� � � � d S )Nzcopy %s) r r �copytree�shutil�copyr r r r )r r r �methods r r! r! so � ��c�4� � � � �Z�Z�\�\�F�� 0�X�X�V�[�F��M�)�V�C��.�.�/�/�/� �F�3�s�8�8�S��Y�Y�����r c �� � t j | � � D ]�\ }}}t j � |t j � || � � � � }t j � |� � st j |� � |D ]W}t j � ||� � }t j � ||� � }t j ||� � �X��d S �N) r �walkr �join�relpath�isdirr r r! ) r r �root�_�files�dest_dir�name�src_f�dest_fs r r r ( s� � ��'�#�,�,� '� '���a���7�<�<��b�g�o�o�d�C�&@�&@�A�A���w�}�}�X�&�&� "��K��!�!�!�� '� '�D��G�L�L��t�,�,�E��W�\�\�(�D�1�1�F��K��v�&�&�&�&� '� '� 'r c �T � d� }t j t | � � d|�� � d S )Nc � � t j |t j � � s't j |t � � | |� � d S � r$ )r �access�W_OK�chmodr )�funcr �exc_infos r �onerrorzsafe_delete.<locals>.onerror4 s>