HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/importlib/resources/__pycache__/readers.cpython-312.opt-2.pyc
�

}h�e�����ddlZddlZddlZddlZddlZddlmZddlmZd�Z	Gd�dej�ZGd�d	ej�ZGd
�dej�ZGd�d
ej�Zy)�N�)�abc)�onlyc�R�ttjj|��S�N)�iter�collections�OrderedDict�fromkeys)�itemss �B/opt/alt/python312/lib64/python3.12/importlib/resources/readers.py�remove_duplicatesrs����'�'�0�0��7�8�8�c��eZdZd�Zd�Zd�Zy)�
FileReaderc�`�tj|j�j|_yr)�pathlib�Path�path�parent)�self�loaders  r
�__init__zFileReader.__init__s���L�L����-�4�4��	rc�L�	t|jj|��Sr��strr�joinpath�r�resources  r
�
resource_pathzFileReader.resource_path�#��	�
�4�9�9�%�%�h�/�0�0rc��|jSr�r�rs r
�fileszFileReader.files����y�y�rN��__name__�
__module__�__qualname__rr r%�rr
rrs��5�1�rrc�0��eZdZd�Z�fd�Zd�Zd�Z�xZS)�	ZipReaderc��|jd�\}}}|jjdd�|zdz|_|j|_y)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�names     r
rzZipReader.__init__!sE���&�&�s�+�
��1�d��m�m�+�+�D�#�6��=��C����~�~��rc�v��	t�|�|�S#t$r}t|jd��d}~wwxYw�Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr�exc�	__class__s   �r
r<zZipReader.open_resource&s;���	1��7�(��2�2���	1�#�C�H�H�Q�K�0�0��	1�s��	8�3�8c��	|j�j|�}|j�xr|j�Sr)r%r�is_file�exists)rr�targets   r
�is_resourcezZipReader.is_resource,s7��	�����&�&�t�,���~�~��3�F�M�M�O�3rc�V�tj|j|j�Sr)�zipfilerr5r3r$s r
r%zZipReader.files4s���|�|�D�L�L�$�+�+�6�6r)r(r)r*rr<rFr%�
__classcell__�rAs@r
r-r- s���&�
1�4�7rr-c�p��eZdZ	d�Zd�Zd�Zd�Zd�Zd�Z�fd�Z	e
d��Zd	�Ze
d
��Zd�Z�xZS)�MultiplexedPathc���tttjt	|���|_|j
s
d}t
|��td�|j
D��std��y)Nz.MultiplexedPath must contain at least one pathc3�<K�|]}|j����y�wr)�is_dir��.0rs  r
�	<genexpr>z+MultiplexedPath.__init__.<locals>.<genexpr>Es����9�T�4�;�;�=�9�s�z)MultiplexedPath only supports directories)	�list�maprrr�_pathsr>�all�NotADirectoryError)r�paths�messages   r
rzMultiplexedPath.__init__@sY���3�w�|�|�->�u�-E�F�G����{�{�F�G�#�G�,�,��9�T�[�[�9�9�$�%P�Q�Q�:rc���d�|jD�}tjd�}tjt||��|��}t
|jd�|D��S)Nc3�JK�|]}|j�D]}|����y�wr)�iterdir)rQr�childs   r
rRz*MultiplexedPath.iterdir.<locals>.<genexpr>Is"����N�d�t�|�|�~�N�e�E�N�E�N�s�!#r8)�keyc3�&K�|]	\}}|���y�wrr+)rQr8�locss   r
rRz*MultiplexedPath.iterdir.<locals>.<genexpr>Ls����!@�:�4��$�!@�s�)rU�operator�
attrgetter�	itertools�groupby�sortedrT�_follow)r�children�by_name�groupss    r
r\zMultiplexedPath.iterdirHsP��N�d�k�k�N���%�%�f�-���"�"�6�(��#@�g�N���4�<�<�!@��!@�A�Arc��t|�d����Nz is not a file�r>r$s r
�
read_byteszMultiplexedPath.read_bytesN����4�&�� 7�8�8rc��t|�d���rkrl�rr?�kwargss   r
�	read_textzMultiplexedPath.read_textQrnrc��y)NTr+r$s r
rOzMultiplexedPath.is_dirTs��rc��y)NFr+r$s r
rCzMultiplexedPath.is_fileWs��rc���	t�|�|�S#tj$r|jdj|�cYSwxYwr:)r;rr�TraversalErrorrU)r�descendantsrAs  �r
rzMultiplexedPath.joinpathZsJ���	9��7�#�[�1�1���!�!�	9�+�4�;�;�q�>�*�*�K�8�8�	9�s��/A�Ac��	tj|d�\}}}	t|�S#t$r%	||�cYS#t$rt|�cYcYSwxYwwxYw)N�)rc�teer�
ValueErrorrW�next)�clsrg�subdirs�one_dir�one_files     r
rfzMultiplexedPath._followbsf��	�&/�]�]�8�Q�%?�"���(�	&���=� ���	&�
&��G�}�$��%�
&��H�~�%�
&��	&�s)�
(�	A�9�A�A�
A�A�Ac��t|�d���rkrlrps   r
�openzMultiplexedPath.openurnrc�4�|jdjSr:)rUr8r$s r
r8zMultiplexedPath.namexs���{�{�1�~�"�"�"rc�R�djd�|jD��}d|�d�S)Nz, c3�(K�|]
}d|�d����y�w)�'Nr+rPs  r
rRz+MultiplexedPath.__repr__.<locals>.<genexpr>}s����>�$�A�d�V�1�+�>�s�zMultiplexedPath(�))�joinrU)rrXs  r
�__repr__zMultiplexedPath.__repr__|s)���	�	�>�$�+�+�>�>��!�%���*�*r)r(r)r*rr\rmrrrOrCr�classmethodrfr��propertyr8r�rIrJs@r
rLrL8s_����R�B�9�9���9��&��&�$9��#��#�+rrLc��eZdZd�Zd�Zd�Zy)�NamespaceReaderc�`�dt|�vrtd��tt|��|_y)N�
NamespacePathzInvalid path)rr{rLrSr)r�namespace_paths  r
rzNamespaceReader.__init__�s+���#�n�"5�5��^�,�,�#�T�.�%9�:��	rc�L�	t|jj|��Srrrs  r
r zNamespaceReader.resource_path�r!rc��|jSrr#r$s r
r%zNamespaceReader.files�r&rNr'r+rr
r�r��s��;�
1�rr�)r	rcrrarH�r�
_itertoolsrr�TraversableResourcesrr-�TraversablerLr�r+rr
�<module>r�sh���������9�
��)�)�
� 7��(�(�7�0F+�c�o�o�F+�R�c�.�.�r