HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/certbot/current/lib/python3.12/site-packages/setuptools/__pycache__/_shutil.cpython-312.pyc
�

�F�h*����dZddlZddlZddlmZmZddlmZddlm	Z		ddlm
Z
ed�Z
d
�Zdede
fdeded
e
fd�Zdefd�Zd�Zd�Zy#e$r
ded	ed
dfd�Z
Y�:wxYw)z2Convenience layer on top of stdlib's shutil and os�N)�Callable�TypeVar�)�py311)�log)�chmod�args�kwargs�returnc��y�N�)r	r
s  ��/build/snapcraft-certbot-c9aaebe726f8beb59a0eb2d8e1671bc4/parts/certbot/install/lib/python3.12/site-packages/setuptools/_shutil.pyrrs����_Tc��tjd||�	t||�y#t$r }tjd|�Yd}~yd}~wwxYw)Nzchanging mode of %s to %ozchmod failed: %s)r�debugr�OSError)�path�mode�es   r�attempt_chmod_verbosersD���I�I�)�4��6�)�
�d�D����)��	�	�$�a�(�(��)�s�&�	A�A
�
A�func.�arg�excc��|tjtjfvr5tjdk(r"t	|t
j�||�S|�)zIshutils onexc callback to automatically call chmod for certain functions.�nt)�os�unlink�remove�namer�stat�S_IWRITE)rrrs   r�_auto_chmodr$ s@��
��	�	�2�9�9�%�%�"�'�'�T�/��c�4�=�=�1��C�y��

�IrFc�0�tj|||�S)zx
    Similar to ``shutil.rmtree`` but automatically executes ``chmod``
    for well know Windows failure scenarios.
    )r�
shutil_rmtree)r�
ignore_errors�onexcs   r�rmtreer)+s��
���t�]�E�:�:rc�\�tjj|�r
t|fi|��yyr
)rr�isdirr))r�optss  r�rmdirr-3s$��	�w�w�}�}�T���t��t��rc�Z�tjd�}tj|�|S)N�)r�umask)�tmps r�
current_umaskr28s��
�(�(�5�/�C��H�H�S�M��Jr)�__doc__rr"�typingrr�compatr�	distutilsrr�ImportError�objectrr�str�
BaseExceptionr$r)r-r2rrr�<module>r;s���8�	��$���
��
�T�]��)��
�3��7�
��"%��,9���� %�K�;��
��U�
�
�V�
�v�
�$�
�
�s�A�A!� A!