AlkantarClanX12

Your IP : 18.117.75.6


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

�

c��f�
����ddlZddlZddlZddlZddlmZddlmZd�ZGd�dej	��Z
Gd�d	ej	��ZGd
�dej��Z
Gd�d
ej	��ZdS)�N�)�abc)�unique_everseenc�Z�ttj�|����S�N)�iter�collections�OrderedDict�fromkeys)�itemss �B/opt/alt/python311/lib64/python3.11/importlib/resources/readers.py�remove_duplicatesrs!����'�0�0��7�7�8�8�8�c� �eZdZd�Zd�Zd�ZdS)�
FileReaderc�L�tj|j��j|_dSr)�pathlib�Path�path�parent)�self�loaders  r
�__init__zFileReader.__init__s���L���-�-�4��	�	�	rc�P�t|j�|����S�z{
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        ��strr�joinpath�r�resources  r
�
resource_pathzFileReader.resource_path�"���4�9�%�%�h�/�/�0�0�0rc��|jSr�r�rs r
�fileszFileReader.files�
���y�rN��__name__�
__module__�__qualname__rr!r&�rr
rrsA������5�5�5�1�1�1�����rrc�0��eZdZd�Z�fd�Zd�Zd�Z�xZS)�	ZipReaderc��|�d��\}}}|j�dd��|zdz|_|j|_dS)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�names     r
rzZipReader.__init__ sK���&�&�s�+�+�
��1�d��m�+�+�D�#�6�6��=��C����~����rc���	t���|��S#t$r}t|jd���d}~wwxYw�Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr �exc�	__class__s   �r
r=zZipReader.open_resource%sS���	1��7�7�(�(��2�2�2���	1�	1�	1�#�C�H�Q�K�0�0�0�����	1���s� $�
A
�A�A
c��|����|��}|���o|���Sr)r&r�is_file�exists)rr�targets   r
�is_resourcezZipReader.is_resource+s<�������&�&�t�,�,���~�~���3�F�M�M�O�O�3rc�@�tj|j|j��Sr)�zipfilerr6r4r%s r
r&zZipReader.files1s���|�D�L�$�+�6�6�6r)r)r*r+rr=rGr&�
__classcell__)rBs@r
r.r.se�������&�&�&�
1�1�1�1�1�4�4�4�7�7�7�7�7�7�7rr.c�b�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
e
Zd	�Ze
d
���Zd�ZdS)
�MultiplexedPathz�
    Given a series of Traversable objects, implement a merged
    version of the interface across all objects. Useful for
    namespace packages which may be multihomed at a single
    name.
    c��tttjt	|������|_|jsd}t
|���td�|jD����std���dS)Nz.MultiplexedPath must contain at least one pathc3�>K�|]}|���V��dSr)�is_dir��.0rs  r
�	<genexpr>z+MultiplexedPath.__init__.<locals>.<genexpr>Bs*����9�9�T�4�;�;�=�=�9�9�9�9�9�9rz)MultiplexedPath only supports directories)	�list�maprrr�_pathsr?�all�NotADirectoryError)r�paths�messages   r
rzMultiplexedPath.__init__=s����3�w�|�->�u�-E�-E�F�F�G�G����{�	-�F�G�#�G�,�,�,��9�9�T�[�9�9�9�9�9�	R�$�%P�Q�Q�Q�	R�	Rrc�j�d�|jD��}t|tjd�����S)Nc3�HK�|]}|���D]}|V���dSr)�iterdir)rQr�files   r
rRz*MultiplexedPath.iterdir.<locals>.<genexpr>Fs7����I�I�$�$�,�,�.�.�I�I�$��I�I�I�I�I�I�Irr9)�key)rUr�operator�
attrgetter)rr&s  r
r\zMultiplexedPath.iterdirEs5��I�I�$�+�I�I�I���u�(�*=�f�*E�*E�F�F�F�Frc�&�t|�d�����Nz is not a file�r?r%s r
�
read_byteszMultiplexedPath.read_bytesI����4� 7� 7� 7�8�8�8rc�&�t|�d����rbrc�rr@�kwargss   r
�	read_textzMultiplexedPath.read_textLrerc��dS)NTr,r%s r
rOzMultiplexedPath.is_dirOs���trc��dS)NFr,r%s r
rDzMultiplexedPath.is_fileRs���urc�n�|���D]}|j|kr|cS�|jd|zSr;)r\r9rU)r�childr]s   r
rzMultiplexedPath.joinpathUsG���L�L�N�N�	�	�D��y�E�!�!�����"��{�1�~��%�%rc�&�t|�d����rbrcrgs   r
�openzMultiplexedPath.open_rerc�&�|jdjSr;)rUr9r%s r
r9zMultiplexedPath.namebs���{�1�~�"�"rc�V�d�d�|jD����}d|�d�S)Nz, c3�"K�|]
}d|�d�V��dS)�'Nr,rPs  r
rRz+MultiplexedPath.__repr__.<locals>.<genexpr>gs*����>�>�$�+�d�+�+�+�>�>�>�>�>�>rzMultiplexedPath(�))�joinrU)rrXs  r
�__repr__zMultiplexedPath.__repr__fs5���	�	�>�>�$�+�>�>�>�>�>��*�%�*�*�*�*rN)r)r*r+�__doc__rr\rdrirOrDr�__truediv__ro�propertyr9rvr,rr
rLrL5s���������R�R�R�G�G�G�9�9�9�9�9�9�������&�&�&��K�9�9�9��#�#��X�#�+�+�+�+�+rrLc� �eZdZd�Zd�Zd�ZdS)�NamespaceReaderc�|�dt|��vrtd���tt|���|_dS)N�
NamespacePathzInvalid path)r�
ValueErrorrLrSr)r�namespace_paths  r
rzNamespaceReader.__init__ls;���#�n�"5�"5�5�5��^�,�,�,�#�T�.�%9�%9�:��	�	�	rc�P�t|j�|����Srrrs  r
r!zNamespaceReader.resource_pathqr"rc��|jSrr$r%s r
r&zNamespaceReader.filesyr'rNr(r,rr
r{r{ksA������;�;�;�
1�1�1�����rr{)r	r_rrI�r�
_itertoolsrr�TraversableResourcesrr.�TraversablerLr{r,rr
�<module>r�s������������������������'�'�'�'�'�'�9�9�9�
�
�
�
�
��)�
�
�
� 7�7�7�7�7��(�7�7�7�,3+�3+�3+�3+�3+�c�o�3+�3+�3+�l�����c�.�����r