Sindbad~EG File Manager

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

�

)Μg	���ddlZddlZddlmZmZeeeeedffZej�fdefd�Z	ejdeeeeffd��Zejdefd��Z
ejdefd	��Z
y)
�N)�Dict�Union�	FilesSpec�specc�x�|j�D]'\}}t|tj|�|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�create�pathlib�Path)r�prefix�name�contentss    �@/usr/local/lib/python3.12/test/test_importlib/resources/_path.py�buildr
s0��,�*�*�,���h��x����f�-��4�5�'��contentc�B�|jd��t||��y)NT)�exist_ok)r)�mkdirr�r�paths  rr	r	's���J�J��J��	�'�$�rc�&�|j|�y)N)�write_bytesrs  r�_r-s�����W�rc�*�|j|d��y)Nzutf-8)�encoding)�
write_textrs  rrr2s���O�O�G�g�O�.r)r
�	functools�typingrr�str�bytesrrr�singledispatchr	�registerr�rr�<module>r%s������
��e�C���3�4�4�5�	�#/�'�,�,�.�6�	�6�4��� �E�#�u�i�/�0� �� �
����u�������/�s�/��/r

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