Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_importlib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_importlib/__pycache__/_path.cpython-312.opt-1.pyc

�

)Μg�
���ddlZddlZddlmZmZ	ddlmZmZee	ee	e
dffZeGd�de��Zdee	efdefd	�Z
ej�fd
edee	effd�Zej d
ee	e
effd��Zej$d
e
fd��Zej$d
e	fd��Zej$d
e	fd��ZGd�d�Zy#e$rddlmZmZY��wxYw)�N)�Dict�Union)�Protocol�runtime_checkable�	FilesSpecc�$�eZdZd�Zd�Zd�Zd�Zy)�	TreeMakerc��y�N�)�self�args�kwargss   �6/usr/local/lib/python3.12/test/test_importlib/_path.py�__truediv__zTreeMaker.__truediv__����c��yrr�r
rs  r�mkdirzTreeMaker.mkdirrrc��yrr�r
�contentrs   r�
write_textzTreeMaker.write_textrrc��yrr)r
rs  r�write_byteszTreeMaker.write_bytesrrN)�__name__�
__module__�__qualname__rrrrrrrr	r	s�����rr	�obj�returnc�P�t|t�r|Stj|�Sr)�
isinstancer	�pathlib�Path)r s r�_ensure_tree_makerr& s���S�)�,�3�C�'�,�,�s�2C�Cr�spec�prefixc�d�|j�D]\}}t|t|�|z��y)aX
    Build a set of files/directories, as described by the spec.

    Each key represents a pathname, and the value represents
    the content. Content may be a nested directory.

    >>> spec = {
    ...     'README.txt': "A README file",
    ...     "foo": {
    ...         "__init__.py": "",
    ...         "bar": {
    ...             "__init__.py": "",
    ...         },
    ...         "baz.py": "# Some code",
    ...     }
    ... }
    >>> target = getfixture('tmp_path')
    >>> build(spec, target)
    >>> target.joinpath('foo/baz.py').read_text(encoding='utf-8')
    '# Some code'
    N)�items�creater&)r'r(�name�contentss    r�buildr.$s-��2�*�*�,���h��x�+�F�3�d�:�;�'rrc�B�|jd��t||��y)NT)�exist_ok)r()rr.�r�paths  rr+r+As���J�J��J��	�'�$�rc�&�|j|�yr)rr1s  r�_r4Gs�����W�rc�*�|j|d��y�Nzutf-8)�encoding�rr1s  rr4r4L����O�O�G�g�O�.rc�*�|j|d��yr6r8r1s  rr4r4Qr9rc�P�eZdZdZej
�dfd�Zd�Zd�ZeZ	d�Z
y)�	Recordingz�
    A TreeMaker object that records everything that would be written.

    >>> r = Recording()
    >>> build({'foo': {'foo1.txt': 'yes'}, 'bar.txt': 'abc'}, r)
    >>> r.record
    ['foo/foo1.txt', 'bar.txt']
    Nc�4�||_|�||_yg|_yr)�loc�record)r
r>r?s   r�__init__zRecording.__init__`s����� &� 2�f�����rc�H�t|j|z|j�Sr)r<r>r?)r
�others  rrzRecording.__truediv__ds������E�)�4�;�;�7�7rc�`�|jjt|j��yr)r?�append�strr>rs   rrzRecording.write_textgs�������3�t�x�x�=�)rc��yrrrs  rrzRecording.mkdirls��r)rrr�__doc__r$�
PurePosixPathr@rrrrrrrr<r<Vs4���1�7�0�0�2�4�;�8�*��K�rr<)�	functoolsr$�typingrrrr�ImportError�typing_extensionsrE�bytesrr	r&r%r.�singledispatchr+�registerr4r<rrr�<module>rPsF�����>�2�
��e�C���3�4�4�5�	�������D�E�#�y�.�1�D�i�D�%1�G�L�L�N�<�
�<��#�y�.�!�<�:��� �E�#�u�i�/�0� �� �
����u�������/�s�/��/����/�s�/��/����[�>�=�=�>�s�C�
C�C

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists