Hacked By AnonymousFox

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

�

c��f����ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
ddlmZmZddlm
Z
e
eejefZgd�ZGd�dej���ZeGd	�d
e����ZGd�de��ZdS)
�N)�Any�BinaryIO�Iterable�Iterator�NoReturn�Text�Optional)�runtime_checkable�Protocol)�Union)�ResourceReader�Traversable�TraversableResourcesc���eZdZdZejdedefd���Zejdedefd���Z	ejdede
fd���Zejdee
fd���Zd	S)
r
zDAbstract base class for loaders to provide resource reading support.�resource�returnc��t�)z�Return an opened, file-like object for binary reading.

        The 'resource' argument is expected to represent only a file name.
        If the resource cannot be found, FileNotFoundError is raised.
        ��FileNotFoundError��selfrs  �>/opt/alt/python311/lib64/python3.11/importlib/resources/abc.py�
open_resourcezResourceReader.open_resources
�� ��c��t�)z�Return the file system path to the specified resource.

        The 'resource' argument is expected to represent only a file name.
        If the resource does not exist on the file system, raise
        FileNotFoundError.
        rrs  r�
resource_pathzResourceReader.resource_paths
�� �r�pathc��t�)zjReturn True if the named 'path' is a resource.

        Files are resources, directories are not.
        r�rrs  r�is_resourcezResourceReader.is_resource*s
�� �rc��t�)z+Return an iterable of entries in `package`.r�rs r�contentszResourceReader.contents2s
�� �rN)�__name__�
__module__�__qualname__�__doc__�abc�abstractmethodrrrr�boolr r�strr#�rrr
r
s�������N�N���	 �d�	 �x�	 �	 �	 ���	 �	��
 �d�
 �t�
 �
 �
 ���
 �	�� �� �� � � ��� �	�� �(�3�-� � � ��� � � rr
)�	metaclassc�<�eZdZdZejdedfd���Zdefd�Z	dde
edefd�Zejde
fd���Zejde
fd	���Zejd
eddfd���Zdeddfd
�Zejdd���Zejdefd���ZdS)rz�
    An object with a subset of pathlib.Path methods suitable for
    traversing directories and opening files.

    Any exceptions that occur when accessing the backing resource
    may propagate unaltered.
    rc��dS)z3
        Yield Traversable objects in self
        Nr,r"s r�iterdirzTraversable.iterdirB����rc��|�d��5}|���cddd��S#1swxYwYdS)z0
        Read contents of self as bytes
        �rbN��open�read)r�strms  r�
read_byteszTraversable.read_bytesHs����Y�Y�t�_�_�	���9�9�;�;�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�7�;�;N�encodingc��|�|���5}|���cddd��S#1swxYwYdS)z/
        Read contents of self as text
        )r9Nr4)rr9r7s   r�	read_textzTraversable.read_textOs����Y�Y��Y�
)�
)�	�T��9�9�;�;�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�8�<�<c��dS)z4
        Return True if self is a directory
        Nr,r"s r�is_dirzTraversable.is_dirVr1rc��dS)z/
        Return True if self is a file
        Nr,r"s r�is_filezTraversable.is_file\r1r�descendantsc��dS)z�
        Return Traversable resolved with any descendants applied.

        Each descendant should be a path segment relative to self
        and each may contain multiple levels separated by
        ``posixpath.sep`` (``/``).
        Nr,)rr@s  r�joinpathzTraversable.joinpathbr1r�childc�,�|�|��S)z2
        Return Traversable child in self
        )rB)rrCs  r�__truediv__zTraversable.__truediv__ls���}�}�U�#�#�#r�rc��dS)z�
        mode may be 'r' or 'rb' to open as text or binary. Return a handle
        suitable for reading (same as pathlib.Path.open).

        When opening as text, accepts encoding parameters such as those
        accepted by io.TextIOWrapper.
        Nr,)r�mode�args�kwargss    rr5zTraversable.openrr1rc��dS)zM
        The base name of this object without any parent references.
        Nr,r"s r�namezTraversable.name|r1r�N)rF)r$r%r&r'r(r)rr0�bytesr8r	r+r;r*r=r?�StrPathrBrEr5�abstractpropertyrLr,rrrr8s���������	����-�0�������
�E�������(�3�-��3�����	����������
	����������
	���W���������$��$�]�$�$�$�$�	��������	���c��������rrc��eZdZdZejdd���Zdedej	fd�Z
dedefd�Z
dedefd	�Zdeefd
�ZdS)
rzI
    The required interface for providing traversable
    resources.
    rrc��dS)z3Return a Traversable object for the loaded package.Nr,r"s r�fileszTraversableResources.files�r1rrc�v�|����|���d��S)Nr3)rSrBr5rs  rrz"TraversableResources.open_resource�s,���z�z�|�|�$�$�X�.�.�3�3�D�9�9�9rc� �t|���rMrrs  rrz"TraversableResources.resource_path�s����)�)�)rrc�t�|����|�����SrM)rSrBr?rs  rr z TraversableResources.is_resource�s*���z�z�|�|�$�$�T�*�*�2�2�4�4�4rc�b�d�|������D��S)Nc3�$K�|]}|jV��dSrM)rL)�.0�items  r�	<genexpr>z0TraversableResources.contents.<locals>.<genexpr>�s$����=�=�d��	�=�=�=�=�=�=r)rSr0r"s rr#zTraversableResources.contents�s*��=�=�d�j�j�l�l�&:�&:�&<�&<�=�=�=�=rN)rr)r$r%r&r'r(r)rSrO�io�BufferedReaderrrrrr*r rr+r#r,rrrr�s���������
	��B�B�B���B�:�g�:�"�2C�:�:�:�:�*�c�*�h�*�*�*�*�5��5�D�5�5�5�5�>�(�3�-�>�>�>�>�>�>rr)r(r\�os�typingrrrrrrr	r
rrr+�PathLikerO�__all__�ABCMetar
rrr,rr�<module>rcsI��
�
�
�
�	�	�	�	�	�	�	�	�N�N�N�N�N�N�N�N�N�N�N�N�N�N�N�N�N�N�.�.�.�.�.�.�.�.���������R�[��%�%�
&��
C�
C�
C��' �' �' �' �' �s�{�' �' �' �' �T�G�G�G�G�G�(�G�G���G�T>�>�>�>�>�>�>�>�>�>�>r

Hacked By AnonymousFox1.0, Coded By AnonymousFox