$26 GRAYBYTE WORDPRESS FILE MANAGER $17

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python37/lib64/python3.7/importlib/__pycache__/

HOME
Current File : /opt/alt/python37/lib64/python3.7/importlib/__pycache__//resources.cpython-37.opt-1.pyc
B

� f�2�	@s�ddlZddlZddlmZddlmZmZddlm	Z	ddl
mZddlm
Z
mZddlmZdd	lmZdd
lmZmZmZmZmZddlmZddlmZmZdd
lmZdddddddddg	Zee efZ!ee ej"fZ#ed�dd�Z$e d�dd�Z%eeej&d�dd�Z'dd �Z(e!e#ed!�d"d�Z)d1e!e#e e ed%�d&d�Z*e!e#e+d!�d'd�Z,d2e!e#e e e d%�d(d�Z-ee!e#eed!�d)d��Z.e!e e/d*�d+d�Z0e!ee d�d,d�Z1Gd-d.�d.ej&�Z2d/d0�Z3dS)3�N�)�abc)�contextmanager�suppress)�
import_module)�ResourceLoader)�BytesIO�
TextIOWrapper)�Path)�
ModuleType)�Iterable�Iterator�Optional�Set�Union)�cast)�BinaryIO�TextIO)�ZipImportError�Package�Resource�contents�is_resource�open_binary�	open_text�path�read_binary�	read_text)�returncCs\t|d�r0|jjdkr*td�|jj���qX|Sn(t|�}|jjdkrTtd�|���n|SdS)z�Take a package name or module object and return the module.

    If a name, the module is imported.  If the passed or imported module
    object is not a package, raise an exception.
    �__spec__Nz{!r} is not a package)�hasattrr�submodule_search_locations�	TypeError�format�namer)�package�module�r'�8/opt/alt/python37/lib64/python3.7/importlib/resources.py�_get_package"s
r)cCs,tj�|�\}}|r$td�|���n|SdS)z�Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    z{!r} must be only a file nameN)�osr�split�
ValueErrorr#)r�parent�	file_namer'r'r(�_normalize_path6sr/)r%rcCs,|j}t|jd�r(ttj|j�|j��SdS)N�get_resource_reader)rr �loaderr�
resources_abc�ResourceReaderr0r$)r%�specr'r'r(�_get_resource_readerBs
r5cCs&|jjdks|jjs"td|����dS)NzPackage has no location )r�origin�has_location�FileNotFoundError)r%r'r'r(�_check_locationPsr9)r%�resourcerc
Cs�t|�}t|�}t|�}|dk	r*|�|�St|�tj�|jj	�}tj�
|�}tj�||�}yt|dd�St
k
r�tt|jj�}d}t|jjd�r�tt
��|�|�}WdQRX|dkr�|jj}d�||�}	t|	��nt|�SYnXdS)zDReturn a file-like object opened for binary reading of the resource.N�rb)�mode�get_dataz{!r} resource not found in {!r})r/r)r5�
open_resourcer9r*r�abspathrr6�dirname�join�open�OSErrorrrr1r rr=r$r#r8r)
r%r:�reader�absolute_package_path�package_path�	full_pathr1�data�package_name�messager'r'r(rUs.


�utf-8�strict)r%r:�encoding�errorsrcCst|�}t|�}t|�}|dk	r2t|�|�||�St|�tj�|j	j
�}tj�|�}tj�||�}yt
|d||d�Stk
�r�tt|j	j�}d}	t|j	jd�r�tt��|�|�}	WdQRX|	dkr�|j	j}
d�||
�}t|��ntt|	�||�SYnXdS)zBReturn a file-like object opened for text reading of the resource.N�r)r<rMrNr=z{!r} resource not found in {!r})r/r)r5r	r>r9r*rr?rr6r@rArBrCrrr1r rr=r$r#r8r)r%r:rMrNrDrErFrGr1rHrIrJr'r'r(rts.

c	Cs.t|�}t|�}t||��
}|��SQRXdS)z+Return the binary contents of the resource.N)r/r)r�read)r%r:�fpr'r'r(r�sc	Cs2t|�}t|�}t||||��
}|��SQRXdS)z�Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)r/r)rrP)r%r:rMrNrQr'r'r(r�s	c	cs�t|�}t|�}t|�}|dk	rLyt|�|��VdStk
rHYqTXnt|�t|jj�j	}||}|�
�rz|Vnvt||��}|��}WdQRXt
��\}}z$t�||�t�|�t|�VWdyt�|�Wntk
r�YnXXdS)akA context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    N)r/r)r5r
�
resource_pathr8r9rr6r-�existsrrP�tempfileZmkstempr*�write�close�remove)	r%r:rD�package_directoryZ	file_pathrQrH�fdZraw_pathr'r'r(r�s2

)r%r$rc	Cszt|�}t|�t|�}|dk	r*|�|�Sytt|��}Wnttfk
rRdSX||kr`dSt|j	j
�j|}|��S)zYTrue if 'name' is a resource inside 'package'.

    Directories are *not* resources.
    NF)
r)r/r5r�setr�NotADirectoryErrorr8r
rr6r-�is_file)r%r$rDZpackage_contentsrr'r'r(r�s
cCsTt|�}t|�}|dk	r |��S|jjdks4|jjs8dSt|jj�j}t�	|�SdS)z�Return an iterable of entries in 'package'.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    Nr')
r)r5rrr6r7r
r-r*�listdir)r%rDrXr'r'r(r�sc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�_ZipImportResourceReaderz�Private class used to support ZipImport.get_resource_reader().

    This class is allowed to reference all the innards and private parts of
    the zipimporter.
    cCs||_||_dS)N)�zipimporter�fullname)�selfr_r`r'r'r(�__init__sz!_ZipImportResourceReader.__init__cCsN|j�dd�}|�d|��}yt|j�|��Stk
rHt|��YnXdS)N�.�/)r`�replacerr_r=rCr8)rar:�fullname_as_pathrr'r'r(r>sz&_ZipImportResourceReader.open_resourcecCst�dS)N)r8)rar:r'r'r(rRsz&_ZipImportResourceReader.resource_pathcCsF|j�dd�}|�d|��}y|j�|�Wntk
r@dSXdS)NrcrdFT)r`rer_r=rC)rar$rfrr'r'r(r%sz$_ZipImportResourceReader.is_resourcec	cs�t|j�|j��}|�|jj�}|j}t�}xp|jjD]d}yt|��|�}Wnt	k
rbw6YnX|jj
}t|�dkr�|j
Vq6||kr6|�|�|Vq6WdS)Nr)
r
r_�get_filenamer`Zrelative_to�archiver-rZ�_filesr,r$�len�add)raZ
fullname_pathZ
relative_pathrFZsubdirs_seen�filenameZrelative�parent_namer'r'r(r0s

z!_ZipImportResourceReader.contentsN)	�__name__�
__module__�__qualname__�__doc__rbr>rRrrr'r'r'r(r^sr^cCs2y|�|�sdSWntk
r&dSXt||�S)N)�
is_packagerr^)r_r`r'r'r(�_zipimport_get_resource_readerQs
rs)rKrL)rKrL)4r*rT�rr2�
contextlibrr�	importlibrZ
importlib.abcr�iorr	Zpathlibr
�typesr�typingrr
rrrrZ	typing.iorrZ	zipimportr�__all__�strr�PathLikerr)r/r3r5r9rr�bytesrrr�boolrrr^rsr'r'r'r(�<module>sN

!
,E


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
24 May 2024 8.34 AM
root / linksafe
0755
__init__.cpython-37.opt-1.pyc
3.642 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
__init__.cpython-37.opt-2.pyc
2.979 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
__init__.cpython-37.pyc
3.642 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
_bootstrap.cpython-37.opt-1.pyc
28.46 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
_bootstrap.cpython-37.opt-2.pyc
21.729 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
_bootstrap.cpython-37.pyc
28.491 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
_bootstrap_external.cpython-37.opt-1.pyc
40.625 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
_bootstrap_external.cpython-37.opt-2.pyc
30.034 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
_bootstrap_external.cpython-37.pyc
40.835 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
abc.cpython-37.opt-1.pyc
13.168 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
abc.cpython-37.opt-2.pyc
6.488 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
abc.cpython-37.pyc
13.168 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
machinery.cpython-37.opt-1.pyc
0.946 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
machinery.cpython-37.opt-2.pyc
0.81 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
machinery.cpython-37.pyc
0.946 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
resources.cpython-37.opt-1.pyc
8.097 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
resources.cpython-37.opt-2.pyc
6.602 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
resources.cpython-37.pyc
8.141 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
util.cpython-37.opt-1.pyc
9.134 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
util.cpython-37.opt-2.pyc
6.328 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
util.cpython-37.pyc
9.134 KB
17 Apr 2024 5.36 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF