HEX
Server: LiteSpeed
System: Linux osault1.hostarmada.net 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: tucom (1048)
PHP: 8.4.24
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.6/site-packages/importlib_resources/__pycache__/readers.cpython-36.pyc
3

	LBj�
�@s�ddlZddlZddlZddlmZddlmZddlmZdd�Z	Gdd	�d	ej
�ZGd
d�dej
�ZGdd
�d
ej
�ZGdd�dej
�ZdS)�N�)�abc)�unique_everseen)�ZipPathcCsttjj|��S)N)�iter�collections�OrderedDict�fromkeys)�items�r�J/tmp/pip-build-44150kxb/importlib-resources/importlib_resources/readers.py�remove_duplicatessr
c@s$eZdZdd�Zdd�Zdd�ZdS)�
FileReadercCstj|j�j|_dS)N)�pathlib�Path�path�parent)�self�loaderrrr�__init__szFileReader.__init__cCst|jj|��S)z{
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        )�strr�joinpath)r�resourcerrr�
resource_pathszFileReader.resource_pathcCs|jS)N)r)rrrr�filesszFileReader.filesN)�__name__�
__module__�__qualname__rrrrrrrrsrcs4eZdZdd�Z�fdd�Zdd�Zdd�Z�ZS)	�	ZipReadercCs4|jd�\}}}|jjdd�|d|_|j|_dS)N�.�\�/)�
rpartition�prefix�replace�archive)rr�module�_�namerrrr szZipReader.__init__csByt�j|�Stk
r<}zt|jd��WYdd}~XnXdS)Nr)�super�
open_resource�KeyError�FileNotFoundError�args)rr�exc)�	__class__rrr*%szZipReader.open_resourcecCs|j�j|�}|j�o|j�S)N)rr�is_file�exists)rr�targetrrr�is_resource+szZipReader.is_resourcecCst|j|j�S)N)rr%r#)rrrrr1szZipReader.files)rrrrr*r3r�
__classcell__rr)r/rrsrc@sheZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
e
Zdd�Ze
dd��Zdd�ZdS)�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.
    cGsHtttjt|���|_|js(d}t|��tdd�|jD��sDtd��dS)Nz.MultiplexedPath must contain at least one pathcss|]}|j�VqdS)N)�is_dir)�.0rrrr�	<genexpr>Bsz+MultiplexedPath.__init__.<locals>.<genexpr>z)MultiplexedPath only supports directories)	�list�maprrr
�_pathsr,�all�NotADirectoryError)r�paths�messagerrrr=szMultiplexedPath.__init__cCs"dd�|jD�}t|tjd�d�S)Ncss |]}|j�D]
}|VqqdS)N)�iterdir)r7r�filerrrr8Fsz*MultiplexedPath.iterdir.<locals>.<genexpr>r()�key)r;r�operator�
attrgetter)rrrrrr@EszMultiplexedPath.iterdircCst|�d���dS)Nz is not a file)r,)rrrr�
read_bytesIszMultiplexedPath.read_bytescOst|�d���dS)Nz is not a file)r,)rr-�kwargsrrr�	read_textLszMultiplexedPath.read_textcCsdS)NTr)rrrrr6OszMultiplexedPath.is_dircCsdS)NFr)rrrrr0RszMultiplexedPath.is_filecCs.x|j�D]}|j|kr
|Sq
W|jd|S)Nr)r@r(r;)r�childrArrrrUs
zMultiplexedPath.joinpathcOst|�d���dS)Nz is not a file)r,)rr-rFrrr�open_szMultiplexedPath.opencCs|jdjS)Nr)r;r()rrrrr(bszMultiplexedPath.namecCs"djdd�|jD��}d|�d�S)Nz, css|]}d|�d�VqdS)�'Nr)r7rrrrr8gsz+MultiplexedPath.__repr__.<locals>.<genexpr>zMultiplexedPath(�))�joinr;)rr>rrr�__repr__fszMultiplexedPath.__repr__N)rrr�__doc__rr@rErGr6r0r�__truediv__rI�propertyr(rMrrrrr55sr5c@s$eZdZdd�Zdd�Zdd�ZdS)�NamespaceReadercCs&dt|�krtd��tt|��|_dS)NZ
NamespacePathzInvalid path)r�
ValueErrorr5r9r)r�namespace_pathrrrrlszNamespaceReader.__init__cCst|jj|��S)z{
        Return the file system path to prevent
        `resources.path()` from creating a temporary
        copy.
        )rrr)rrrrrrqszNamespaceReader.resource_pathcCs|jS)N)r)rrrrryszNamespaceReader.filesN)rrrrrrrrrrrQksrQ)rrrC�r�
_itertoolsr�_compatrr
ZTraversableResourcesrrZTraversabler5rQrrrr�<module>s6