Your IP : 3.14.249.191


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/pyfakefs/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/pyfakefs/__pycache__/fake_os.cpython-311.pyc

�

��bgn���(�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZmZddlmZddlmZmZmZmZmZmZm Z ddl!m"Z"m#Z#dd	l$m%Z%dd
l&m'Z'm(Z(m)Z)ddl*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8erddl9m:Z:d
Z;Gd�d��Z<ej=dkrTdedefd�Z>ej?e<ej@��D]5\ZAZBeBjC�Dd��seEe<eAe>eB�����6ed���ZFdS)zV Uses :py:class:`FakeOsModule` to provide a
    fake :py:mod:`os` module replacement.
�N)�contextmanager)�S_IFREG�S_IFSOCK)
�List�Optional�Callable�Union�Any�Tuple�cast�AnyStr�
TYPE_CHECKING�Set)�use_scandir)�
FakeDirectory�FakeDirWrapper�StandardStreamWrapper�FakeFileWrapper�FakePipeWrapper�FakeFile�AnyFileWrapper)�FakeFileOpen�
_OpenModes)�FakePathModule)�scandir�walk�ScanDirIter)�FakeStatResult�is_int_type�is_byte_string�make_string_path�IS_PYPY�	to_string�matching_string�	AnyString�to_bytes�PERM_EXE�PERM_DEF�is_root�get_uid�get_gid)�FakeFilesystem�c��eZdZdZdZedeefd���Zdsd�Z	e
defd���Ze
defd	���Ze
de
efd
���Ze
defd���Ze
defd���Zd
edededefd�Zdefd�Z	dtdd�dedede
ede
edef
d�Zd
eddfd�Zd
ededefd�Zd
ededefd�Zdeeeffd�Zd
edefd�Zd edefd!�Z deddfd"�Z!defd#�Z"defd$�Z#dedeefd%�Z$d&Z%d'Z&d(d)�ded*e'd+e(de
efd,�Z)	dtd(d)�de
ed+e(deefd-�Z*d(d)�ded*e'd+e(ddfd.�Z+	dud(d)�ded*e'd0eded+e(ddfd1�Z,dvdede-fd3�Z.			dwd4ed5e(d6e
e(d7e(fd8�Z/dtdede
edefd9�Z0dd(d:�dede
ed+e(defd;�Z1dd�dede
edefd<�Z2dtdede
eddfd=�Z3dd�dede
eddfd>�Z4ddd?�d@edAedBe
edCe
eddf
dD�Z5dEedFefdG�Z6ddd?�d@edAedBe
edCe
eddf
dH�Z7dd�dede
eddfdI�Z8dJeddfdK�Z9e:fdd�dedede
eddfdL�Z;e:dfdJededMe
e(ddfdN�Z<dedOe=de
edefdP�Z>dedQeddfdR�Z?d
edQeddfdS�Z@ddd(dT�dedede
edUe(d+e(de(fdV�ZAdd(d:�dedede
ed+e(ddf
dW�ZBdededdfdX�ZC				dxdedYe
eeDeeEfeDeeEffdZe
eeefde
ed+e(ddfd[�ZFdd(d:�ded\ed]ede
ed+e(ddfd^�ZG		dydd�dede
ed_ede
eddf
d`�ZH	dzdd�d@edAedae(de
eddf
db�ZIddd?�d@edAedBe
edCe
eddf
dc�ZJd
eddfdd�ZKd
eddfde�ZLdfedgedhediedef
dj�ZMdefdk�ZNdefdl�ZOdePfdm�ZQe
dePe=fdn���ZRe
dePe=fdo���ZSe
dePe=fdp���ZTe
dePe=fdq���ZUdJedefdr�ZVdS){�FakeOsModulea�Uses FakeFilesystem to provide a fake os module replacement.

    Do not create os.path separately from os, as there is a necessary circular
    dependency between os and os.path to replicate the behavior of the standard
    Python modules.  What you want to do is to just let FakeOsModule take care
    of `os.path` setup itself.

    # You always want to do this.
    filesystem = fake_filesystem.FakeFilesystem()
    my_os_module = fake_os.FakeOsModule(filesystem)
    F�returnc��gd�}tj�d��r|gd�z
}tjdkr|ddgz
}tr|dgz
}|S)zqReturn the list of patched function names. Used for patching
        functions imported from the module.
        )�access�chdir�chmod�chown�close�fstat�fsync�getcwd�lchmod�link�listdir�lstat�makedirs�mkdir�mknod�open�read�readlink�remove�
removedirs�rename�rmdir�stat�symlink�umask�unlink�utimer�write�getcwdb�replace�linux)�	fdatasync�getxattr�	listxattr�removexattr�setxattr�win32�getgid�getuidr)�sys�platform�
startswithr)�_dirs �a/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pyfakefs/fake_os.py�dirzFakeOsModule.dir]s���
 
� 
� 
��B�<�"�"�7�+�+�	�����
�D��<�7�"�"�����
�D��	 ��Y�K��D����
filesystemr,c��||_t|_t|j|��|_d|_d|_d|_d|_dS)z�Also exposes self.path (to fake os.path).

        Args:
            filesystem: FakeFilesystem used to provide file system information
        N)	r`�os�	os_moduler�path�_supports_follow_symlinks�_supports_dir_fd�_supports_effective_ids�_supports_fd)�selfr`s  r]�__init__zFakeOsModule.__init__�sK��%��� ���"�4�?�D�9�9��	�8<��&�/3���6:��$�+/����r_c��|jjS�N)rd�devnull�ris r]rmzFakeOsModule.devnull��
���y� � r_c��|jjSrl)rd�seprns r]rqzFakeOsModule.sep�s���y�}�r_c��|jjSrl)rd�altseprns r]rszFakeOsModule.altsep�s
���y��r_c��|jjSrl)rd�lineseprns r]ruzFakeOsModule.linesep�ror_c��|jjSrl)rd�pathseprns r]rwzFakeOsModule.pathsep�ror_�fd�args�kwargsc�z�t|��std���t|j��|g|�Ri|��S)a[Redirector to open() builtin function.

        Args:
            fd: The file descriptor of the file to open.
            *args: Pass through args.
            **kwargs: Pass through kwargs.

        Returns:
            File object corresponding to file_des.

        Raises:
            TypeError: if file descriptor is not an integer.
        �an integer is required)r�	TypeErrorrr`)rirxryrzs    r]�fdopenzFakeOsModule.fdopen�sK���2���	6��4�5�5�5�,�|�D�O�,�,�R�A�$�A�A�A�&�A�A�Ar_c��|jjrdStjdkrdSt	jd��}t	j|��|S)zReturn the current umask.rrV�)r`�
is_windows_fsrYrZrbrJ)ri�masks  r]�_umaskzFakeOsModule._umask�sG���?�(�	��1��<�7�"�"��5�
�8�A�;�;�D��H�T�N�N�N��Kr_N)�dir_fdrd�flags�moder�c
��|�||j|��}|�'|jjrd}nd|���z}ttd��o|tjztjk}t|tj	zo||tj
z|tjtj
zzdk|tjzdk|tj
zdk|tjzdk���}|jr|jrt#d���|rG|j�|t'|t)t+j��������}|jjs�|j�|��r�|j�|��}t3|t4��rx|js|jjr|jr%|j�t<j|��tA|||j��}|j�!|��}	|	|_"|	Sd}
|}ttd	��r|tj#ztj#k}tI|j|d
���||
|���}t3|tJ��rJ�|j&|jj'kr|�(||��|�)��S)
a�Return the file descriptor for a FakeFile.

        Args:
            path: the path to the file
            flags: low-level bits to indicate io operation
            mode: bits to define default permissions
                Note: only basic modes are supported, OS-specific modes are
                ignored
            dir_fd: If not `None`, the file descriptor of a directory,
                with `file_path` being relative to this directory.

        Returns:
            A file descriptor.

        Raises:
            OSError: if the path cannot be found
            ValueError: if invalid mode is given
            NotImplementedError: if `os.O_EXCL` is used without `os.O_CREAT`
        Ni�i��	O_TMPFILEr)�
must_exist�can_read�	can_write�truncate�append�must_not_existz,O_EXCL without O_CREAT mode is not supported�b�O_TEMPORARYT)�delete_on_close�raw_io)�
open_modes)*�_path_with_dir_fdrAr`r�r��hasattrrbr�r�O_CREAT�O_WRONLY�O_RDWR�O_TRUNC�O_APPEND�O_EXCLr�r��NotImplementedError�	joinpathsr$�str�uuid�uuid4�exists�resolve�
isinstancer�is_macosr��raise_os_error�errno�EISDIRr�_add_open_file�filedesr�rr�file_object�dev_nullr4�fileno)
rirdr�r�r��has_tmpfile_flagr��obj�dir_wrapper�file_des�	str_flagsr��	fake_files
             r]rAzFakeOsModule.open�s���6�%�%�d�D�I�v�>�>���<���,�
.��������
�
�~�-��
�B��$�$�M����)=���)M�	� � �2�:�-�-�F�6F�2F����,�,��r�y�2�;�6�7�1�<��R�Z�'�1�,��2�;�&�!�+� �2�9�,��1�

�
�
�
��$�	V��)>�	V�%�&T�U�U�U��	��?�,�,��o�d�C��
���,=�,=�>�>���D���,�	 ���1G�1G��1M�1M�	 ��/�)�)�$�/�/�C��#�}�-�-�
 �"�-�G�6:�o�6N�G��)�G��O�2�2�5�<��F�F�F�,�S�$���H�H���?�9�9�+�F�F��&.��#����	�*���2�}�%�%�	G�#�b�n�4���F�O�
�L��O�_�T�
�
�
�
�	�j�2�2�2�	��i�)>�?�?�?�?�?�� �D�O�$<�<�<��J�J�t�T�"�"�"����!�!�!r_c�b�|j�|��}|���dS)z�Close a file descriptor.

        Args:
            fd: An integer file descriptor for the file object requested.

        Raises:
            OSError: bad file descriptor.
            TypeError: if file descriptor is not an integer.
        N)r`�
get_open_filer6)rirx�file_handles   r]r6zFakeOsModule.close*s1���o�3�3�B�7�7���������r_�nc��|j�|��}t|t��rd|_t|t
��r*|j�tj|j	��|�
|��S)a�Read number of bytes from a file descriptor, returns bytes read.

        Args:
            fd: An integer file descriptor for the file object requested.
            n: Number of bytes to read from file.

        Returns:
            Bytes read from file.

        Raises:
            OSError: bad file descriptor.
            TypeError: if file descriptor is not an integer.
        T)r`r�r�rr�rr�r��EBADF�	file_pathrB)rirxr�r�s    r]rBzFakeOsModule.read7sw���o�3�3�B�7�7���k�?�3�3�	&�!%�K���k�>�2�2�	O��O�*�*�5�;��8M�N�N�N�����"�"�"r_�contentsc��tt|j�|����}t	|t
��r*|j�tj|j	��t	|t��r|�|��Sd|_|�
��|���|�|��|���t!|��S)a�Write string to file descriptor, returns number of bytes written.

        Args:
            fd: An integer file descriptor for the file object requested.
            contents: String of bytes to write to file.

        Returns:
            Number of bytes written.

        Raises:
            OSError: bad file descriptor.
            TypeError: if file descriptor is not an integer.
        T)rrr`r�r�rr�r�r�r�rrMr��_sync_io�update_flush_pos�flush�len)rirxr�r�s    r]rMzFakeOsModule.writeLs����?�D�O�,I�,I�"�,M�,M�N�N���k�>�2�2�	O��O�*�*�5�;��8M�N�N�N��k�?�3�3�	/��$�$�X�.�.�.�!����������$�$�&�&�&����(�#�#�#��������8�}�}�r_c�&�tj��\}}t|j|d��}|j�|��}||_t|j|d��}|j�|��}||_|j|jfS)NFT)rb�piperr`r�r�)ri�read_fd�write_fd�read_wrapperr��
write_wrappers      r]r�zFakeOsModule.pipehs����G�I�I����&�t����G�G���?�1�1�,�?�?��'���'����4�H�H�
��?�1�1�-�@�@�� (�
���#�]�%:�:�:r_c��|j�|�����}t|t��sJ�|j���S)aCReturn the os.stat-like tuple for the FakeFile object of file_des.

        Args:
            fd: The file descriptor of filesystem object to retrieve.

        Returns:
            The FakeStatResult object corresponding to entry_path.

        Raises:
            OSError: if the filesystem object doesn't exist.
        )r`r��
get_objectr�r�stat_result�copy�rirxr�s   r]r7zFakeOsModule.fstatrsP���o�3�3�B�7�7�B�B�D�D���+�x�0�0�0�0�0��&�+�+�-�-�-r_r�c�r�t|��std���|jj}||j_|S)z�Change the current umask.

        Args:
            mask: (int) The new umask value.

        Returns:
            The old umask.

        Raises:
            TypeError: if new_mask is of an invalid type.
        r|)rr}r`rJ)rir��	old_umasks   r]rJzFakeOsModule.umask�s=���4� � �	6��4�5�5�5��O�)�	� $�����r_c��	|j�|d���}n^#t$rQ}|jjr?|jtjkr*ttjdt|��z����d}~wwxYw|j�|��|j�	|��}t��s9|jtzs*|j�
tj|j��||j_dS)aChange current working directory to target directory.

        Args:
            path: The path to new current working directory.

        Raises:
            OSError: if user lacks permission to enter the argument directory
                or if the target is not a directory.
        T��allow_fdzNot a directory: N)r`�resolve_path�OSErrorr�r�r��ENOTDIRr��
confirmdirr�r)�st_moder'r��EACCES�name�cwd)rird�exc�	directorys    r]r3zFakeOsModule.chdir�s���	��?�/�/��t�/�D�D�D�D���	�	�	���'�
N�C�I���,D�,D��e�m�-@�3�t�9�9�-L�M�M�M������	����	
��"�"�4�(�(�(��O�+�+�D�1�1�	��y�y�	I��!2�X�!=�	I��O�*�*�5�<���H�H�H�"�����s��
A:�AA5�5A:c�4�t|jj��S)z!Return current working directory.)r#r`r�rns r]r9zFakeOsModule.getcwd�s�����,�-�-�-r_c�4�t|jj��S)z*Return current working directory as bytes.)r&r`r�rns r]rNzFakeOsModule.getcwdb�s�����+�,�,�,r_c�6�|j�|��S)a]Return a list of file names in target_directory.

        Args:
            path: Path to the target directory within the fake
                filesystem.

        Returns:
            A list of file names within the target directory in arbitrary
                order.

        Raises:
          OSError:  if the target is not a directory.
        )r`r<�rirds  r]r<zFakeOsModule.listdir�s����&�&�t�,�,�,r_�r�T��follow_symlinks�	attributer�c��|jjstd���t|t��r&|�t
j����}|j�||d���}|j	�
|��S)a;Return the value of the given extended filesystem attribute for
        `path`.

        Args:
            path: File path, file descriptor or path-like object (for
                Python >= 3.6).
            attribute: (str or bytes) The attribute name.
            follow_symlinks: (bool) If True (the default), symlinks in the
                path are traversed.

        Returns:
            The contents of the extended attribute as bytes or None if
            the attribute does not exist.

        Raises:
            OSError: if the path does not exist.
        z'module 'os' has no attribute 'getxattr'Tr�)r`�is_linux�AttributeErrorr��bytes�decoderY�getfilesystemencodingr��xattr�get�rirdr�r��file_objs     r]rRzFakeOsModule.getxattr�s���(��'�	L� �!J�K�K�K��i��'�'�	F�!�(�(��)B�)D�)D�E�E�I��?�*�*�4��4�*�P�P���~�!�!�)�,�,�,r_c��|jjstd���|�|jjn|}|j�tt|��|d���}t|j�	����S)a�Return a list of the extended filesystem attributes on `path`.

        Args:
            path: File path, file descriptor or path-like object (for
                Python >= 3.6). If None, the current directory is used.
            follow_symlinks: (bool) If True (the default), symlinks in the
                path are traversed.

        Returns:
            A list of all attribute names for the given path as str.

        Raises:
            OSError: if the path does not exist.
        z(module 'os' has no attribute 'listxattr'NTr�)
r`r�r�r�r�rr
�listr��keys)rirdr��path_strr�s     r]rSzFakeOsModule.listxattr�s���"��'�	M� �!K�L�L�L�*.�,�4�?�&�&�D���?�*�*����"�"���+�
�
��
�H�N�'�'�)�)�*�*�*r_c��|jjstd���t|t��r&|�t
j����}|j�||d���}||j	vr
|j	|=dSdS)a�Removes the extended filesystem attribute attribute from `path`.

        Args:
            path: File path, file descriptor or path-like object (for
                Python >= 3.6).
            attribute: (str or bytes) The attribute name.
            follow_symlinks: (bool) If True (the default), symlinks in the
                path are traversed.

        Raises:
            OSError: if the path does not exist.
        z*module 'os' has no attribute 'removexattr'Tr�N)
r`r�r�r�r�r�rYr�r�r�r�s     r]rTzFakeOsModule.removexattrs�����'�	O� �!M�N�N�N��i��'�'�	F�!�(�(��)B�)D�)D�E�E�I��?�*�*�4��4�*�P�P�����&�&���y�)�)�)�'�&r_r�valuec�*�|jjstd���t|t��r&|�t
j����}t|��std���|j�
||d���}||jv}|r5||jkr*|j�
tj|j��|s5||jkr*|j�
tj|j��||j|<dS)a'Sets the value of the given extended filesystem attribute for
        `path`.

        Args:
            path: File path, file descriptor or path-like object (for
                Python >= 3.6).
            attribute: The attribute name (str or bytes).
            value: (byte-like) The value to be set.
            follow_symlinks: (bool) If True (the default), symlinks in the
                path are traversed.

        Raises:
            OSError: if the path does not exist.
            TypeError: if `value` is not a byte-like object.
        z'module 'os' has no attribute 'setxattr'za bytes-like object is requiredTr�N)r`r�r�r�r�r�rYr�r r}r�r��XATTR_CREATEr�r��ENODATArd�
XATTR_REPLACE�EEXIST)rirdr�r�r�r�r�r�s        r]rUzFakeOsModule.setxattrs
��0��'�	L� �!J�K�K�K��i��'�'�	F�!�(�(��)B�)D�)D�E�E�I��e�$�$�	?��=�>�>�>��?�*�*�4��4�*�P�P���h�n�,���	I�e�t�0�0�0��O�*�*�5�=�(�-�H�H�H��	H�%�4�#5�5�5��O�*�*�5�<���G�G�G�$)���y�!�!�!r_�.c�,�t|j|��S)a�Return an iterator of DirEntry objects corresponding to the
        entries in the directory given by path.

        Args:
            path: Path to the target directory within the fake filesystem.

        Returns:
            An iterator to an unsorted list of os.DirEntry objects for
            each entry in path.

        Raises:
            OSError: if the target is not a directory.
        )rr`r�s  r]rzFakeOsModule.scandir?s���t���-�-�-r_�top�topdown�onerror�followlinksc�2�t|j||||��S)a�Perform an os.walk operation over the fake filesystem.

        Args:
            top: The root directory from which to begin walk.
            topdown: Determines whether to return the tuples with the root as
                the first entry (`True`) or as the last, after all the child
                directory tuples (`False`).
          onerror: If not `None`, function which will be called to handle the
                `os.error` instance provided when `os.listdir()` fails.
          followlinks: If `True`, symbolic links are followed.

        Yields:
            (path, directories, nondirectories) for top and each of its
            subdirectories.  See the documentation for the builtin os module
            for further details.
        )rr`)rir�r�r�r�s     r]rzFakeOsModule.walkOs��.�D�O�S�'�7�K�H�H�Hr_c�n�|�||j|��}|j�|��S)a!Read the target of a symlink.

        Args:
            path:  Symlink to read the target of.
            dir_fd: If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.

        Returns:
            the string representing the path to which the symbolic link points.

        Raises:
            TypeError: if `path` is None
            OSError: (with errno=ENOENT) if path is not a valid path, or
                     (with errno=EINVAL) if path is valid, but is not a symlink
        )r�rCr`�rirdr�s   r]rCzFakeOsModule.readlinkhs3�� �%�%�d�D�M�6�B�B����'�'��-�-�-r_)r�r�c�p�|�||j|��}|j�||��S)axReturn the os.stat-like tuple for the FakeFile object of entry_path.

        Args:
            path:  path to filesystem object to retrieve.
            dir_fd: (int) If not `None`, the file descriptor of a directory,
                with `entry_path` being relative to this directory.
            follow_symlinks: (bool) If `False` and `entry_path` points to a
                symlink, the link itself is changed instead of the linked
                object.

        Returns:
            The FakeStatResult object corresponding to entry_path.

        Raises:
            OSError: if the filesystem object doesn't exist.
        )r�rHr`)rirdr�r�s    r]rHzFakeOsModule.stat{s5��.�%�%�d�D�I�v�>�>����#�#�D�/�:�:�:r_c�r�|�||j|��}|j�|d���S)a�Return the os.stat-like tuple for entry_path,
        not following symlinks.

        Args:
            path:  path to filesystem object to retrieve.
            dir_fd: If not `None`, the file descriptor of a directory, with
                `path` being relative to this directory.

        Returns:
            the FakeStatResult object corresponding to `path`.

        Raises:
            OSError: if the filesystem object doesn't exist.
        Fr�)r�r=r`rHr�s   r]r=zFakeOsModule.lstat�s8�� �%�%�d�D�J��?�?����#�#�D�%�#�@�@�@r_c�r�|�||j|��}|j�|��dS�a�Remove the FakeFile object at the specified file path.

        Args:
            path: Path to file to be removed.
            dir_fd: If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.

        Raises:
            OSError: if path points to a directory.
            OSError: if path does not exist.
            OSError: if removal failed.
        N)r�rDr`r�s   r]rDzFakeOsModule.remove��9���%�%�d�D�K��@�@������t�$�$�$�$�$r_c�r�|�||j|��}|j�|��dSr)r�rKr`rDr�s   r]rKzFakeOsModule.unlink�rr_)�
src_dir_fd�
dst_dir_fd�src�dstrrc��|�||j|��}|�||j|��}|j�||��dS)aSRename a FakeFile object at old_file_path to new_file_path,
        preserving all properties.
        Also replaces existing new_file_path object, if one existed
        (Unix only).

        Args:
            src: Path to filesystem object to rename.
            dst: Path to where the filesystem object will live
                after this call.
            src_dir_fd: If not `None`, the file descriptor of a directory,
                with `src` being relative to this directory.
            dst_dir_fd: If not `None`, the file descriptor of a directory,
                with `dst` being relative to this directory.

        Raises:
            OSError: if old_file_path does not exist.
            OSError: if new_file_path is an existing directory.
            OSError: if new_file_path is an existing file (Windows only)
            OSError: if new_file_path is an existing file and could not
                be removed (Unix)
            OSError: if `dirname(new_file)` does not exist
            OSError: if the file would be moved to another filesystem
                (e.g. mount point)
        N�r�rFr`�rirr	rrs     r]rFzFakeOsModule.rename�sU��@�$�$�S�$�+�z�B�B���$�$�S�$�+�z�B�B������s�C�(�(�(�(�(r_�old�newc�j�|j�|��\}}|r1|r/|j�|��s|�|��|�||��|j�|��\}}|r+|r+	|�|��dS#t$rYdSwxYwdSdS)a�Fakes `os.renames`, documentation taken from there.

        Super-rename; create directories as necessary and delete any left
        empty.  Works like rename, except creation of any intermediate
        directories needed to make the new pathname good is attempted
        first.  After the rename, directories corresponding to rightmost
        path segments of the old name will be pruned until either the
        whole path is consumed or a nonempty directory is found.

        Note: this function can fail with the new directory structure made
        if you lack permissions needed to unlink the leaf directory or
        file.

        N)r`�	splitpathr�r>rFrEr�)rir
r�head�tails     r]�renameszFakeOsModule.renames�s����_�.�.�s�3�3�
��d��	 �D�	 ���!7�!7��!=�!=�	 ��M�M�$�������C������_�.�.�s�3�3�
��d��	�D�	�
�����%�%�%�%�%���
�
�
����
����	�	�	�	s�	B � 
B.�-B.c��|�||j|��}|�||j|��}|j�||d���dS)a�Renames a FakeFile object at old_file_path to new_file_path,
        preserving all properties.
        Also replaces existing new_file_path object, if one existed.

        Arg
            src: Path to filesystem object to rename.
            dst: Path to where the filesystem object will live
                after this call.
            src_dir_fd: If not `None`, the file descriptor of a directory,
                with `src` being relative to this directory.
            dst_dir_fd: If not `None`, the file descriptor of a directory,
                with `dst` being relative to this directory.

        Raises:
            OSError: if old_file_path does not exist.
            OSError: if new_file_path is an existing directory.
            OSError: if new_file_path is an existing file and could
                not be removed
            OSError: if `dirname(new_file)` does not exist
            OSError: if the file would be moved to another filesystem
                (e.g. mount point)
        T)�
force_replaceNrrs     r]rOzFakeOsModule.replacesY��<�$�$�S�$�+�z�B�B���$�$�S�$�+�z�B�B������s�C�t��<�<�<�<�<r_c�r�|�||j|��}|j�|��dS)a�Remove a leaf Fake directory.

        Args:
            path: (str) Name of directory to remove.
            dir_fd: If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.

        Raises:
            OSError: if `path` does not exist or is not a directory,
            or as per FakeFilesystem.remove_object. Cannot remove '.'.
        N)r�rGr`r�s   r]rGzFakeOsModule.rmdir(s9���%�%�d�D�J��?�?������d�#�#�#�#�#r_r�c�n�|j�|��}|j�|��}|jr>|j�t
j|j�|����n|�	|��|j�
|��\}}|s|j�
|��\}}|rd|rd|j�|��}|jrdS|j�	|d���|j�
|��\}}|r|�`dSdSdSdS)aRemove a leaf fake directory and all empty intermediate ones.

        Args:
            name: the directory to be removed.

        Raises:
            OSError: if target_directory does not exist or is not a directory.
            OSError: if target_directory is not empty.
        T)�
allow_symlinkN)r`�absnormpathr��entriesr�r��	ENOTEMPTYrd�basenamerG�split)rir�r�rr�head_dirs      r]rEzFakeOsModule.removedirs7sM����*�*�4�0�0���O�.�.�t�4�4�	���	��O�*�*�5�?�D�I�<N�<N�t�<T�<T�U�U�U�U��J�J�t�����Y�_�_�T�*�*�
��d��	/������.�.�J�D�$��	/�t�	/���1�1�$�7�7�H���
����O�!�!�$�d�!�;�;�;������.�.�J�D�$�
�	/�t�	/�	/�	/�	/�	/�	/�	/�	/�	/r_c��|�||j|��}	|j�||��dS#t$r;}|jt
jkr |j�|j|���d}~wwxYw)a[Create a leaf Fake directory.

        Args:
            path: (str) Name of directory to create.
                Relative paths are assumed to be relative to '/'.
            mode: (int) Mode to create directory with.  This argument defaults
                to 0o777.  The umask is applied to this mode.
            dir_fd: If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.

        Raises:
            OSError: if the directory name is invalid or parent directory is
                read only or as per FakeFilesystem.add_object.
        N)r�r?r`�makedirr�r�r�r�)rirdr�r��es     r]r?zFakeOsModule.mkdirRs���"�%�%�d�D�J��?�?��	��O�#�#�D�$�/�/�/�/�/���	�	�	��w�%�,�&�&���.�.�q�w��=�=�=������	���s�;�
B�6A;�;B�exist_okc�F�|�d}|j�|||��dS)a}Create a leaf Fake directory + create any non-existent parent dirs.

        Args:
            name: (str) Name of directory to create.
            mode: (int) Mode to create directory (and any necessary parent
                directories) with. This argument defaults to 0o777.
                The umask is applied to this mode.
            exist_ok: (boolean) If exist_ok is False (the default), an OSError
                is raised if the target directory already exists.

        Raises:
            OSError: if the directory already exists and exist_ok=False, or as
                per :py:meth:`FakeFilesystem.create_dir`.
        NF)r`r>)rir�r�r"s    r]r>zFakeOsModule.makedirsks/��"���H��� � ��t�X�6�6�6�6�6r_�fctc���	t|��}n#t$r|}YnwxYw|��||jvrtd���t	|t
��rt
d|jz���|j�	|��s_|j
�|��}|j�tt|�����j|��S|S)z@Return the path considering dir_fd. Raise on invalid parameters.Nz#dir_fd unavailable on this platformz2%s: Can't specify dir_fd without matching path_str)r!r}�supports_dir_fdr�r��int�
ValueError�__name__rd�isabsr`r��joinrrr�)rirdr$r��	open_files     r]r�zFakeOsModule._path_with_dir_fd�s���	�#�D�)�)�D�D���	�	�	��D�D�D�	�������$�.�.�.�)�*O�P�P�P��$��$�$�
� �(�*-�,�7�����9�?�?�4�(�(�
� �O�9�9�&�A�A�	��y�~�~���9�#7�#7�#9�#9�:�:�?������s��!�!�lengthc�L�|j�|d���}||_dS)a�Truncate the file corresponding to path, so that it is
         length bytes in size. If length is larger than the current size,
         the file is filled up with zero bytes.

        Args:
            path: (str or int) Path to the file, or an integer file
                descriptor for the file object.
            length: (int) Length of the file after truncating it.

        Raises:
            OSError: if the file does not exist or the file descriptor is
                invalid.
        Tr�N)r`r��size)rirdr-r�s    r]r�zFakeOsModule.truncate�s,���o�-�-�d�T�-�B�B��!����r_c���|j�|�����}t|t��r	||_dSt
tjd���)a�Truncate the file corresponding to fd, so that it is
         length bytes in size. If length is larger than the current size,
         the file is filled up with zero bytes.

        Args:
            fd: (int) File descriptor for the file object.
            length: (int) Maximum length of the file after truncating it.

        Raises:
            OSError: if the file descriptor is invalid
        zInvalid file descriptorN)	r`r�r�r�rr/r�r�r�)rirxr-r�s    r]�	ftruncatezFakeOsModule.ftruncate�sY���o�3�3�B�7�7�B�B�D�D���k�?�3�3�	B�%�K�����%�+�'@�A�A�Ar_)r��
effective_idsr�r2c�f�|r|jjrtd���|�||j|��}	|�||���}n.#t$r!}|jtjkrYd}~dS�d}~wwxYwt��r|tjz}||jdz	dzz|kS)a�Check if a file exists and has the specified permissions.

        Args:
            path: (str) Path to the file.
            mode: (int) Permissions represented as a bitwise-OR combination of
                os.F_OK, os.R_OK, os.W_OK, and os.X_OK.
            dir_fd: If not `None`, the file descriptor of a directory, with
                `path` being relative to this directory.
            effective_ids: (bool) Unused. Only here to match the signature.
            follow_symlinks: (bool) If `False` and `path` points to a symlink,
                the link itself is queried instead of the linked object.

        Returns:
            bool, `True` if file is accessible, `False` otherwise.
        z2access: effective_ids unavailable on this platformr�NF��)
r`r�r�r�r2rHr�r��ENOENTr)rb�W_OKr�)rirdr�r�r2r�r��os_errors        r]r2zFakeOsModule.access�s���0�	�T�_�:�	�%�D���
��%�%�d�D�K��@�@��	��)�)�D�/�)�J�J�K�K���	�	�	��~���-�-��u�u�u�u�u������	�����9�9�	��R�W�H��D���,��1�Q�6�7�D�@�@s�A�
A>�A9�8A9�9A>c���|s$|j|jvstrtd���|�||j|��}|j�|||��dS)a�Change the permissions of a file as encoded in integer mode.

        Args:
            path: (str) Path to the file.
            mode: (int) Permissions.
            dir_fd: If not `None`, the file descriptor of a directory, with
                `path` being relative to this directory.
            follow_symlinks: (bool) If `False` and `path` points to a symlink,
                the link itself is queried instead of the linked object.
        z=`follow_symlinks` for chmod() is not available on this systemN)r4�supports_follow_symlinksr"r�r�r`)rirdr�r�r�s     r]r4zFakeOsModule.chmod�sq��$�	��J�d�;�;�;�w�;�%�R���
��%�%�d�D�J��?�?������d�D�/�:�:�:�:�:r_c�v�|jjrtd���|j�||d���dS)z�Change the permissions of a file as encoded in integer mode.
        If the file is a link, the permissions of the link are changed.

        Args:
          path: (str) Path to the file.
          mode: (int) Permissions.
        zname 'lchmod' is not definedFr�N)r`r��	NameErrorr4)rirdr�s   r]r:zFakeOsModule.lchmod�sC���?�(�	<��:�;�;�;�����d�D�%��@�@�@�@�@r_�times�nsc�z�|�||j|��}|j�||||���dS)acChange the access and modified times of a file.

        Args:
            path: (str) Path to the file.
            times: 2-tuple of int or float numbers, of the form (atime, mtime)
                which is used to set the access and modified times in seconds.
                If None, both times are set to the current time.
            ns: 2-tuple of int numbers, of the form (atime, mtime)  which is
                used to set the access and modified times in nanoseconds.
                If None, both times are set to the current time.
            dir_fd: If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.
            follow_symlinks: (bool) If `False` and `path` points to a symlink,
                the link itself is queried instead of the linked object.

            Raises:
                TypeError: If anything other than the expected types is
                    specified in the passed `times` or `ns` tuple,
                    or if the tuple length is not equal to 2.
                ValueError: If both times and ns are specified.
        )r=r>r�N)r�rLr`)rirdr=r>r�r�s      r]rLzFakeOsModule.utime
sB��:�%�%�d�D�J��?�?������d�%�B���X�X�X�X�Xr_�uid�gidc�"�|�||j|��}|j�||d���}t	|t
��rt	|t
��st
d���|dkr||_|dkr	||_dSdS)aSet ownership of a faked file.

        Args:
            path: (str) Path to the file or directory.
            uid: (int) Numeric uid to set the file or directory to.
            gid: (int) Numeric gid to set the file or directory to.
            dir_fd: (int) If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.
            follow_symlinks: (bool) If `False` and path points to a symlink,
                the link itself is changed instead of the linked object.

        Raises:
            OSError: if path does not exist.

        `None` is also allowed for `uid` and `gid`.  This permits `os.rename`
        to use `os.chown` even when the source file `uid` and `gid` are
        `None` (unset).
        Tr�zAn integer is required���N)	r�r5r`r�r�r'r}�st_uid�st_gid)rirdr@rAr�r�r�s       r]r5zFakeOsModule.chown*s���6�%�%�d�D�J��?�?���o�-�-�d�O�d�-�S�S���#�s�#�#�	6�:�c�3�+?�+?�	6��4�5�5�5��"�9�9�!$�K���"�9�9�!$�K�����9r_�devicec��|jjrtd���|�
tdz}|s|tzs2t	��s$|j�tj��|�||j	|��}|j
�|��\}}|sf|j�|d���r%|j�tj
|��|j�tj|��|t|d��t|d��fvr%|j�tj|��|j�|d���r%|j�tj
|��|j�|t#|||jjz|j�����dS)	aCreate a filesystem node named 'filename'.

        Does not support device special files or named pipes as the real os
        module does.

        Args:
            path: (str) Name of the file to create
            mode: (int) Permissions to use and type of file to be created.
                Default permissions are 0o666.  Only the stat.S_IFREG file type
                is supported by the fake implementation.  The umask is applied
                to this mode.
            device: not supported in fake implementation
            dir_fd: If not `None`, the file descriptor of a directory,
                with `path` being relative to this directory.

        Raises:
          OSError: if called with unsupported options or the file can not be
          created.
        z%module 'os' has no attribute 'mknode'Ni�T)�
check_linkr�z..)r`)r`r�r�rr)r�r��EPERMr�r@rdrr�r�r6r$�
add_objectrrJ)rirdr�rFr�rrs       r]r@zFakeOsModule.mknodNs���6�?�(�	J� �!H�I�I�I��<��U�?�D��	8����	8��	�	�	8��O�*�*�5�;�7�7�7��%�%�d�D�J��?�?���Y�_�_�T�*�*�
��d��	?���%�%�d�t�%�<�<�
C���.�.�u�|�T�B�B�B��O�*�*�5�<��>�>�>��O�D�#�.�.���d�0K�0K�L�L�L��O�*�*�5�<��>�>�>��?�!�!�$�4�!�8�8�	?��O�*�*�5�<��>�>�>���"�"���T�4�4�?�#8�"8�8�T�_�U�U�U�	
�	
�	
�	
�	
r_�target_is_directoryc�x�|�||j|��}|j�||d���dS)a�Creates the specified symlink, pointed at the specified link target.

        Args:
            src: The target of the symlink.
            dst: Path to the symlink to create.
            target_is_directory: Currently ignored.
            dir_fd: If not `None`, the file descriptor of a directory,
                with `src` being relative to this directory.

        Raises:
            OSError:  if the file already exists.
        F)�create_missing_dirsN)r�rIr`�create_symlink)rirr	rKr�s     r]rIzFakeOsModule.symlink�s@��(�$�$�S�$�,��?�?����&�&�s�C�U�&�K�K�K�K�Kr_c��|�||j|��}|�||j|��}|j�||��dS)a_Create a hard link at new_path, pointing at old_path.

        Args:
            src: An existing path to the target file.
            dst: The destination path to create a new link at.
            src_dir_fd: If not `None`, the file descriptor of a directory,
                with `src` being relative to this directory.
            dst_dir_fd: If not `None`, the file descriptor of a directory,
                with `dst` being relative to this directory.

        Raises:
            OSError:  if something already exists at new_path.
            OSError:  if the parent directory doesn't exist.
        N)r�r;r`rs     r]r;zFakeOsModule.link�sT��,�$�$�S�$�)�Z�@�@���$�$�S�$�)�Z�@�@������S�#�&�&�&�&�&r_c�t�d|cxkrtkr'nn$|j�tj��tt|j�|����}|jjrCt|d��r|j
s.|j�tj|j��dSdSdS)a
Perform fsync for a fake file (in other words, do nothing).

        Args:
            fd: The file descriptor of the open file.

        Raises:
            OSError: file_des is an invalid file descriptor.
            TypeError: file_des is not an integer.
        r�allow_updateN)
�NR_STD_STREAMSr`r�r��EINVALrrr�r�r�rQr�r�r�s   r]r8zFakeOsModule.fsync�s���
��#�#�#�#�^�#�#�#�#�#��O�*�*�5�<�8�8�8��?�D�O�,I�,I�"�,M�,M�N�N���?�(�	S��;��7�7�
S�{�?W�
S���.�.�u�{�K�<Q�R�R�R�R�R�	S�	S�
S�
Sr_c��|jjs|jjrtd���d|cxkrtkr'nn$|j�tj��|j�|��dS)aPerform fdatasync for a fake file (in other words, do nothing).

        Args:
            fd: The file descriptor of the open file.

        Raises:
            OSError: `fd` is an invalid file descriptor.
            TypeError: `fd` is not an integer.
        z(module 'os' has no attribute 'fdatasync'rN)	r`r�r�r�rRr�r�rSr�)rirxs  r]rQzFakeOsModule.fdatasync�s����?�(�	M�D�O�,D�	M� �!K�L�L�L���#�#�#�#�^�#�#�#�#�#��O�*�*�5�<�8�8�8���%�%�b�)�)�)�)�)r_�fd_out�fd_in�offset�countc��|jjrtd���d|cxkrtkr'nn$|j�t
j��d|cxkrtkr'nn$|j�t
j��tt|j�	|����}tt|j�	|����}|jj
r9|���jj
dztkrtd���|�1|jj
rt!d���|�|��}nz|���}|�|��|dkr!|jj
r|���}n|�|��}|�|��|r+|�|��}	|���|	SdS)aCopy count bytes from file descriptor fd_in to file descriptor
        fd_out starting at offset.

        Args:
            fd_out: The file descriptor of the destination file.
            fd_in: The file descriptor of the source file.
            offset: The offset in bytes where to start the copy in the
                source file. If `None` (Linux only), copying is started at
                the current position, and the position is updated.
            count: The number of bytes to copy. If 0, all remaining bytes
                are copied (MacOs only).

        Raises:
            OSError: If `fd_in` or `fd_out` is an invalid file descriptor.
            TypeError: If `fd_in` or `fd_out` is not an integer.
            TypeError: If `offset` is None under MacOs.
        z'module 'os' has no attribute 'sendfile'ri�zSocket operation on non-socketNzNone is not a valid offset)r`r�r�rRr�r�rSrrr�r�r�r�r�rr�r}rB�tell�seekrMr�)
rirUrVrWrX�source�destr��position�writtens
          r]�sendfilezFakeOsModule.sendfile�s���$�?�(�	L� �!J�K�K�K���&�&�&�&��&�&�&�&�&��O�*�*�5�<�8�8�8���'�'�'�'��'�'�'�'�'��O�*�*�5�<�8�8�8��o�t��'D�'D�U�'K�'K�L�L���O�T�_�%B�%B�6�%J�%J�K�K���?�#�	@���� � �,�4�x�?�8�K�K��>�?�?�?��>���'�
>�� <�=�=�=��{�{�5�)�)�H�H��{�{�}�}�H��K�K�������z�z�d�o�6�z�!�;�;�=�=���!�;�;�u�-�-���K�K��!�!�!��	��j�j��*�*�G��J�J�L�L�L��N��qr_c�T�|jjrtd���t��S)z�Returns the user id set in the fake filesystem.
        If not changed using ``set_uid``, this is the uid of the real system.
        zname 'getuid' is not defined)r`r�r<r*rns r]rXzFakeOsModule.getuid�*���?�(�	<��:�;�;�;��y�y�r_c�T�|jjrtd���t��S)z�Returns the group id set in the fake filesystem.
        If not changed using ``set_gid``, this is the gid of the real system.
        zname 'getgid' is not defined)r`r�r<r+rns r]rWzFakeOsModule.getgidrbr_c���t��}|D]U}t||j��r)|�t	||j�����@|�|���V|Srl)�setr�r)�add�getattr)ri�original_functions�	functions�fns    r]�fake_functionszFakeOsModule.fake_functionssj���E�E�	�$�	"�	"�B��t�R�[�)�)�
"��
�
�g�d�B�K�8�8�9�9�9�9��
�
�b�!�!�!�!��r_c�f�|j�$|�|jj��|_|jSrl)rerkrcr:rns r]r:z%FakeOsModule.supports_follow_symlinkss6���)�1�-1�-@�-@���7�.�.�D�*��-�-r_c�f�|j�$|�|jj��|_|jSrl)rfrkrcr&rns r]r&zFakeOsModule.supports_dir_fd%s/��� �(�$(�$7�$7���8V�$W�$W�D�!��$�$r_c�f�|j�$|�|jj��|_|jSrl)rhrkrc�supports_fdrns r]rozFakeOsModule.supports_fd+s/����$� $� 3� 3�D�N�4N� O� O�D��� � r_c�f�|j�$|�|jj��|_|jSrl)rgrkrc�supports_effective_idsrns r]rqz#FakeOsModule.supports_effective_ids1s6���'�/�+/�+>�+>���5�,�,�D�(��+�+r_c�,�t|j|��S)z5Forwards any unfaked calls to the standard os module.)rgrc)rir�s  r]�__getattr__zFakeOsModule.__getattr__9s���t�~�t�,�,�,r_)r`r,rl)r)r�)TNF)NNNT)Nr)F)Wr)�
__module__�__qualname__�__doc__�use_original�staticmethodrr�r^rj�propertyrmrqrrsrurwr'r
rr~r�r
rAr6r�rBrMrr�rr7rJr3r9rNr<r�r�r%�boolrRrSrTrUrrrrCrHr=rDrKrFrrOrGrEr(r?r>rr�r�r1r2r4r:r	�floatrLr5r@rIr;r8rQr`rXrWrrkr:r&rorqrs�r_r]r/r/Ns�
������
�
��L��4��c��4�4�4��\�4�l0�0�0�0��!��!�!�!��X�!���S�����X��� ���
� � � ��X� ��!��!�!�!��X�!��!��!�!�!��X�!�B��B�S�B�C�B�N�B�B�B�B�$������(#�	P"�!%�
P"�P"�P"��P"��P"��s�m�	P"���
�
P"�

�P"�P"�P"�P"�d��������#�s�#�s�#�u�#�#�#�#�*���u�������8;�e�C��H�o�;�;�;�;�.��.��.�.�.�.�"�#��#�����$#�&�#�T�#�#�#�#�0.��.�.�.�.�-��-�-�-�-�-�F�-�t�F�|�-�-�-�-� �L��M�NR�-�-�-��-�'0�-�FJ�-�	�%��-�-�-�-�:(,�+�HL�+�+�+��V�$�+�AE�+�	
�c��+�+�+�+�:NR�*�*�*��*�'0�*�FJ�*�	
�*�*�*�*�:�%*�!%�%*�%*�%*��%*��%*��	%*�
�%*��%*�
�%*�%*�%*�%*�N.�.�C�.�+�.�.�.�.�&�"&�!�I�I�
�I��I��$��	I�
�I�I�I�I�2.�.�V�.�X�c�]�.�c�.�.�.�.�.!%� $�;�;�;��;���
�	;�
�;�
�
;�;�;�;�4>B�A�A�A�&�A�X�c�]�A�n�A�A�A�A�&%�%�6�%�8�C�=�%�D�%�%�%�%� ?C�%�%�%�6�%�h�s�m�%�t�%�%�%�%�*%)�$(�
")�")�")�
�")��")�
�S�M�")��S�M�
")�
�")�")�")�")�H�6�������>%)�$(�
 =� =� =�
� =�� =�
�S�M� =��S�M�
 =�
� =� =� =� =�D>B�
$�
$�
$�&�
$�X�c�]�
$�d�
$�
$�
$�
$�/�v�/�$�/�/�/�/�8)1��MQ������"%��=E�c�]��	
�����4)1�T�7�7��7�"%�7�<D�T�N�7�	
�7�7�7�7�*���!)��3;�C�=��	�����2"�V�"�S�"�T�"�"�"�"�"B�C�B��B��B�B�B�B�.!%�#� $�%A�%A�%A��%A��%A�
��
�%A��
%A��%A�
�%A�%A�%A�%A�X!%� $�
;�;�;��;��;�
��
�;��
;�
�;�;�;�;�6
A�6�
A��
A��
A�
A�
A�
A�HL�(,� $� $�
Y�Y��Y���e�C��J�/��s�E�z�1B�B�C�D�Y�
�U�3��8�_�%�	Y�
��
�Y��
Y�
�Y�Y�Y�Y�L!%� $�"%�"%�"%��"%��"%��	"%���
�
"%��"%�
�"%�"%�"%�"%�N#��	1
�!%�
1
�1
�1
��1
��s�m�1
��	1
���
�
1
�
�1
�1
�1
�1
�n%*�	L�!%�
L�L�L�
�L��L�"�	L���
�
L�
�L�L�L�L�8%)�$(�
'�'�'�
�'��'�
�S�M�'��S�M�
'�
�'�'�'�'�4S��S��S�S�S�S�$*�C�*�D�*�*�*�*�"-�s�-�3�-��-�C�-�C�-�-�-�-�^�������������C������.�#�h�-�.�.�.��X�.��%��X��%�%�%��X�%�
�!�S��]�!�!�!��X�!�
�,��H�
�,�,�,��X�,�-��-��-�-�-�-�-�-r_r/)r-�
�fr0c�F��tj����fd���}|S)z�Decorator used for real pathlib Path methods to ensure that
        real os functions instead of faked ones are used.
        Applied to all non-private methods of `FakeOsModule`.c���tjrG|r%t|dt��r
|dd�}tt�j��|i|��S�|i|��S)Nrr�)r/rwr�rgrbr))ryrzr~s  �r]�wrappedz%handle_original_call.<locals>.wrappedEso����(�
@��$�J�t�A�w��=�=�$�����8�D�.�w�r�1�:�.�.��?��?�?�?��1�d�%�f�%�%�%r_)�	functools�wraps)r~r�s` r]�handle_original_callr�@s:���

���	�	�	&�	&�	&�	&�
�	�	&��r_�_c#�fK�	dt_dV�dt_dS#dt_wxYw)z�Temporarily use original os functions instead of faked ones.
    Used to ensure that skipped modules do not use faked calls.
    TNF)r/rwr|r_r]�use_original_osr�Us>����
*�$(��!�
����$)��!�!�!��E��!�)�)�)�)s�"�0)Grvr�r��inspectrbrYr��
contextlibrrHrr�typingrrrr	r
rrr
rr�pyfakefs.extra_packagesr�pyfakefs.fake_filerrrrrrr�pyfakefs.fake_openrr�pyfakefs.fake_pathr�pyfakefs.fake_scandirrrr�pyfakefs.helpersrrr r!r"r#r$r%r&r'r(r)r*r+�pyfakefs.fake_filesystemr,rRr/�version_infor��
getmembers�
isfunctionr�rjr)r[�setattrr�r|r_r]�<module>r�s`����
������������	�	�	�	�
�
�
�
�����%�%�%�%�%�%���������������������������������0�/�/�/�/�/�������������������8�7�7�7�7�7�7�7�-�-�-�-�-�-�<�<�<�<�<�<�<�<�<�<���������������������������������"�8�7�7�7�7�7�7���m-�m-�m-�m-�m-�m-�m-�m-�`'��g������X����� '�G�&�|�W�5G�H�H�B�B���b��{�%�%�c�*�*�	B��G�L�$�(<�(<�R�(@�(@�A�A�A���*�*���*�*�*r_

?>