%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/importlib/resources/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/importlib/resources/__pycache__/_legacy.cpython-312.pyc

�

���f�
���ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlm
Z
eejefZeZd�Zdedefd�Zed	ed
ede	fd��Zed	ed
edefd��Ze		dd	ed
ed
edede
f
d��Ze		dd	ed
ed
ededef
d��Zed	edeefd��Zed	ededefd��Zed	ed
edeej8fd��Zy)�N)�Union�Iterable�ContextManager�BinaryIO�TextIO�Any�)�_commonc�B��tj���fd��}|S)Nc�f��tj�j�d�td���|i|��S)Nz� is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.�)�
stacklevel)�warnings�warn�__name__�DeprecationWarning)�args�kwargs�funcs  ��2/usr/lib/python3.12/importlib/resources/_legacy.py�wrapperzdeprecated.<locals>.wrappers>����
�
��}�}�o�P�
P�
��	
��T�$�V�$�$�)�	functools�wraps)rrs` r�
deprecatedrs%����_�_�T��%��%��Nr�path�returnc��t|�}tjj|�\}}|rt	|�d���|S)z�Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    z must be only a file name)�str�osr�split�
ValueError)r�str_path�parent�	file_names    r�normalize_pathr&s@��
�4�y�H����
�
�h�/��F�I�
��D�8�#<�=�>�>��r�package�resourcec�b�tj|�t|�zjd�S)zDReturn a file-like object opened for binary reading of the resource.�rb�r
�filesr&�open�r'r(s  r�open_binaryr/*s(��
�M�M�'�"�^�H�%=�=�C�C�D�I�Irc�`�tj|�t|�zj�S)z+Return the binary contents of the resource.)r
r,r&�
read_bytesr.s  r�read_binaryr20s&��
�M�M�'�"�^�H�%=�=�I�I�K�Kr�encoding�errorsc�h�tj|�t|�zjd||��S)zBReturn a file-like object opened for text reading of the resource.�r)r3r4r+)r'r(r3r4s    r�	open_textr76s7��
�M�M�'�"�^�H�%=�=�C�C��h�v�D��rc�j�t||||�5}|j�cddd�S#1swYyxYw)z�Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)r7�read)r'r(r3r4�fps     r�	read_textr;Cs2��
�7�H�h��	7��2��w�w�y����s�)�2c��tj|�j�D�cgc]}|j��c}Scc}w)z�Return an iterable of entries in `package`.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    )r
r,�iterdir�name)r'rs  r�contentsr?Ss.��#*�-�-��"8�"@�"@�"B�C�$�D�I�I�C�C��Cs�<r>c���t|��t�fd�tj|�j	�D��S)zYTrue if `name` is a resource inside `package`.

    Directories are *not* resources.
    c3�`�K�|]%}|j�k(xr|j����'y�w)N)r>�is_file)�.0�traversabler(s  �r�	<genexpr>zis_resource.<locals>.<genexpr>es5�������	���H�$�>��)<�)<�)>�>��s�+.)r&�anyr
r,r=)r'r>r(s  @r�is_resourcerG^s;����d�#�H���"�=�=��1�9�9�;���rc�j�tjtj|�t|�z�S)akA context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    )r
�as_filer,r&r.s  rrrks&���?�?�7�=�=��1�N�8�4L�L�M�Mr)zutf-8�strict)rr �pathlib�typesr�typingrrrrrr�r
�
ModuleTyper�Package�Resourcerr&r/�bytesr2r7r;r?�boolrG�Pathr�rr�<module>rVs����	����I�I��
�� � �#�%�
&�����	��	��	��J��J�H�J��J��J�
�L��L�H�L��L��L�
���		�
�	��	��	�
�		�
�	��	����	�
������
�	�
	�����D�g�D�(�3�-�D��D��	��	��	��	��	��N�
�N��N��G�L�L�!�N��Nr

Zerion Mini Shell 1.0