AlkantarClanX12

Your IP : 18.224.65.198


Current Path : /opt/alt/python311/lib64/python3.11/importlib/resources/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/importlib/resources/__pycache__/_legacy.cpython-311.opt-1.pyc

�

c��f�
���ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlm
Z
eejefZeZd�Zd�Zededed	e	fd
���Zededed	efd���Ze		ddedededed	e
f
d���Ze		ddedededed	ef
d���Zeded	eefd���Zededed	efd���Zededed	eejfd���ZdS)�N)�Union�Iterable�ContextManager�BinaryIO�TextIO�Any�)�_commonc�F��tj����fd���}|S)Nc�\��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  ��B/opt/alt/python311/lib64/python3.11/importlib/resources/_legacy.py�wrapperzdeprecated.<locals>.wrappersR����
��}�
P�
P�
P�
��	
�	
�	
�	
��t�T�$�V�$�$�$�)�	functools�wraps)rrs` r�
deprecatedrs8����_�T���%�%�%�%���%��Nrc��t|��}tj�|��\}}|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�os�path�split�
ValueError)r�str_path�parent�	file_names    r�normalize_pathr%sL���4�y�y�H���
�
�h�/�/��F�I�
�?��D�=�=�=�>�>�>��r�package�resource�returnc�p�tj|��t|��z�d��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�'�"�"�^�H�%=�%=�=�C�C�D�I�I�Irc�n�tj|��t|��z���S)z+Return the binary contents of the resource.)r
r,r%�
read_bytesr.s  r�read_binaryr21s-��
�M�'�"�"�^�H�%=�%=�=�I�I�K�K�Kr�utf-8�strict�encoding�errorsc�v�tj|��t|��z�d||���S)zBReturn a file-like object opened for text reading of the resource.�r)r5r6r+)r&r'r5r6s    r�	open_textr97s@��
�M�'�"�"�^�H�%=�%=�=�C�C��h�v�D���rc��t||||��5}|���cddd��S#1swxYwYdS)z�Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)r9�read)r&r'r5r6�fps     r�	read_textr=Ds���
�7�H�h��	7�	7��2��w�w�y�y���������������������s�4�8�8c�b�d�tj|�����D��S)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.
    c��g|]	}|j��
S�)�name)�.0rs  r�
<listcomp>zcontents.<locals>.<listcomp>\s��C�C�C�$�D�I�C�C�Cr)r
r,�iterdir)r&s r�contentsrETs/��D�C�'�-��"8�"8�"@�"@�"B�"B�C�C�C�CrrAc���t|���t�fd�tj|�����D����S)zYTrue if `name` is a resource inside `package`.

    Directories are *not* resources.
    c3�V�K�|]#}|j�ko|���V��$dS)N)rA�is_file)rB�traversabler's  �r�	<genexpr>zis_resource.<locals>.<genexpr>fsP��������	��H�$�>��)<�)<�)>�)>������r)r%�anyr
r,rD)r&rAr's  @r�is_resourcerL_s`����d�#�#�H������"�=��1�1�9�9�;�;������rc�n�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  rrrls+���?�7�=��1�1�N�8�4L�4L�L�M�M�Mr)r3r4)rr�pathlib�typesr�typingrrrrrr�r
�
ModuleTyper�Package�Resourcerr%r/�bytesr2r9r=rE�boolrL�Pathrr@rr�<module>rYs�������	�	�	�	�������������I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�������
�� �#�%�
&�������
�
�
��J��J�H�J��J�J�J���J�
�L��L�H�L��L�L�L���L�
���		�	�
�	��	��	�
�		�
�	�	�	���	����	��
������
�	�
	��������D�g�D�(�3�-�D�D�D���D��	��	��	��	�	�	���	��N�
�N��N��G�L�!�N�N�N���N�N�Nr