HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/root/var/opt/nydus/ops/importlib_resources/__pycache__/_common.cpython-39.pyc
a

�,�hI�@s�ddlmZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZdd�Zdd�Z
d	d
�Zejddd
��Ze
ejdd���Ze�e�ejdd���ZdS)�)�absolute_importN�)�Path�package_spec�FileNotFoundError�ZipPath�singledispatch�suppresscCst|�}t|�pt|�S)z=
    Return a Traversable object for the given package.

    )r�from_traversable_resources�fallback_resources)�package�spec�r�L/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/importlib_resources/_common.py�from_package
srcCs6tt��|j��Wd�S1s(0YdS)z|
    If the spec.loader implements TraversableResources,
    directly or implicitly, it will have a ``files()`` method.
    N)r	�AttributeError�loader�files)r
rrrr
s
r
cCsJt|j�j}z&|jj}|�|�}t|t|�d�WStyDYn0|S)N�/)	r�origin�parentr�archive�relative_tor�str�	Exception)r
�package_directory�archive_path�rel_pathrrrrs
r�ccs�tj|d�\}}zHt�||��t�|�t|�VWzt�|�Wq~tyVYq~0n$zt�|�WntyzYn00dS)N��suffix)�tempfile�mkstemp�os�write�closer�remover)�readerr �fd�raw_pathrrr�	_tempfile*s
�r*ccs:t|j|jd��}|VWd�n1s,0YdS)zu
    Given a Traversable object, return that object as a
    path on the local file system in a context manager.
    rN)r*�
read_bytes�name)�path�localrrr�as_file;sr/ccs
|VdS)z7
    Degenerate behavior for pathlib.Path objects.
    Nr)r-rrr�_Fsr0)r)�
__future__rr#r!�
contextlibZ_compatrrrrrr	rr
r�contextmanagerr*r/�registerr0rrrr�<module>s