File: //usr/lib/python3/dist-packages/samba/__pycache__/xattr.cpython-310.pyc
o
�/a� � @ s8 d dl mZ d dlZd dlZd dlZdd� Zdd� ZdS )� )�xattrNc C sL t jdfD ]}ztj�| t j�}tj�|t j|� W q ty# Y qw dS )z8Copy ACL related attributes from a path to another path.zsystem.posix_acl_accessN)r �XATTR_NTACL_NAME�samba�xattr_native�
wrap_getxattr�
wrap_setxattr� Exception)�frompath�topath� attr_name� attribute� r
�-/usr/lib/python3/dist-packages/samba/xattr.py� copyattrs s ����r c C s� t �| �}t �|� |D ]4}t j�| |�}t j�||�}t j�|�r.t �|�}t �||� qt j�|�r:t ||� qt
�||� qt
�| |� t
| |� dS )z�Recursively copy a directory tree using shutil.copy2(), preserving xattrs.
The destination directory must not already exist.
If exception(s) occur, an Error is raised with a list of reasons.
N)�os�listdir�makedirs�path�join�islink�readlink�symlink�isdir�copytree_with_xattrs�shutil�copy2�copystatr )�src�dst�names�name�srcname�dstname�linktor
r
r r '