PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
pyfakefs
/
__pycache__
� .�9h;��� �\ � d Z ddlZddlZddlZddlZddlmZ ddlmZ G d� d� � Z dS )a� A fake shutil module implementation that uses fake_filesystem for unit tests. Note that only `shutildisk_usage()` is faked, the rest of the functions shall work fine with the fake file system if `os`/`os.path` are patched. :Includes: FakeShutil: Uses a FakeFilesystem to provide a fake replacement for the shutil module. :Usage: The fake implementation is automatically involved if using `fake_filesystem_unittest.TestCase`, pytest fs fixture, or directly `Patcher`. � N)�RLock)�Callablec � � e Zd ZdZ e� � Z eed� � oej Z eed� � oej Z eed� � oej Z ej Zg d�Zej dk sej dk re� g d�� � ed � � � Zd � Zd� Zd� Zd edefd�Zd� Zej dk r)ej dk rdd�d�Zddej ddfd�Zej fd�Zd� Z dS )�FakeShutilModulez�Uses a FakeFilesystem to provide a fake replacement for shutil module. Automatically created if using `fake_filesystem_unittest.TestCase`, the `fs` fixture, the `patchfs` decorator, or directly the `Patcher`. �_USE_CP_COPY_FILE_RANGE�_HAS_FCOPYFILE�_USE_CP_SENDFILE)�copy�copyfile�rmtree)� � �win32)�copy2�copytree�movec � � dS )zqReturn the list of patched function names. Used for patching functions imported from the module. )� disk_usage� r � �q/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyfakefs/fake_filesystem_shutil.py�dirzFakeShutilModule.dir; s � � �r c �: � || _ t | _ d| _ dS )z�Construct fake shutil module using the fake filesystem. Args: filesystem: FakeFilesystem used to provide file system information r N)� filesystem�shutil� shutil_module�_patch_level)�selfr s r �__init__zFakeShutilModule.__init__B s! � � %���#�������r c �, � | xj dz c_ | j dk rd S | j rd| j _ | j rd| j _ | j rd| j _ | j r6t j dk r| j j | j _ d S d| j _ d S d S )N� F�r � )r �has_fcopy_filer r �use_copy_file_ranger �use_sendfiler �use_fd_functions�sys�version_info�_rmtree_unsafe�_rmtree_impl�_use_fd_functions�r s r �_start_patching_global_varsz,FakeShutilModule._start_patching_global_varsL s� � ����Q������q� � ��F��� 6�05�D��-��#� ?�9>�D��6��� 8�27�D��/�� � =���7�*�*��&�5� �"�/�/�/� 8=��"�4�4�4� =� =r c �, � | xj dz c_ | j dk rd S | j rd| j _ | j rd| j _ | j rd| j _ | j r6t j dk r| j j | j _ d S d| j _ d S d S )Nr! r Tr"