403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/utils/__pycache__/filesystem.cpython-311.pyc
�

�/�c�
���ddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZddlmZmZmZddlmZddlmZded	efd
�Zedede
d	eeddffd���Zed
ed��ed�����Zeej��Zded	efd�Zded	efd�Zdeded	e
efd�Z ded	ee!e"ffd�Z#ded	efd�Z$ded	ee!e"ffd�Z%ded	efd�Z&dS)�N)�contextmanager)�NamedTemporaryFile)�Any�BinaryIO�	Generator�List�Union�cast)�retry�stop_after_delay�
wait_fixed)�get_path_uid)�format_size�path�returnc���tjdksttd��sdStj�|��sJ�d}||kr�tj�|��r^tj��dkr(	t|��}n#t$rYdSwxYw|dkStj
|tj��S|tj�|��}}||k��dS)N�win32�geteuidTrF)
�sys�platform�hasattr�osr�isabs�lexistsrr�OSError�access�W_OK�dirname)r�previous�path_uids   �@/usr/lib/python3/dist-packages/pip/_internal/utils/filesystem.py�check_path_ownerr"s����|�w���g�b�)�&<�&<���t�
�7�=�=��������H�
�(�
�
�
�7�?�?�4� � �
	9��z�|�|�q� � �!�+�D�1�1�H�H���!�!�!� �5�5�!�����1�}�$��y��r�w�/�/�/�!�2�7�?�?�4�#8�#8�d�H��(�
�
��5s�B�
B&�%B&�kwargsc+�K�tddtj�|��tj�|��dd�|��5}tt|��}	|V�|���tj|�	����n?#|���tj|�	����wxYw	ddd��dS#1swxYwYdS)a%Return a file-like object pointing to a tmp file next to path.

    The file is created securely and is ensured to be written to disk
    after the context reaches its end.

    kwargs will be passed to tempfile.NamedTemporaryFile to control
    the way the temporary file will be opened.
    Fz.tmp)�delete�dir�prefix�suffixN�)
rrrr�basenamer
r�flush�fsync�fileno)rr#�f�results    r!�adjacent_tmp_filer0+s0����
�
���G�O�O�D�!�!��w����%�%��	
�
�
�
�
�&�
��h��"�"��	&��L�L�L��L�L�N�N�N��H�V�]�]�_�_�%�%�%�%��
�L�L�N�N�N��H�V�]�]�_�_�%�%�%�%����%�&�&�&�&�&�&�&�&�&�&�&�&����&�&�&�&�&�&s*�C1�%B$�);C1�$<C � C1�1C5�8C5T�g�?)�reraise�stop�waitc�J�tj�|��sGtj�|��}||krn!|}tj�|���Gtjdkrtj|tj��St|��S)zgCheck if a directory is writable.

    Uses os.access() on POSIX, tries creating files on Windows.
    �posix)rr�isdirr�namerr�_test_writable_dir_win)r�parents  r!�test_writable_dirr;Ls����g�m�m�D�!�!�������&�&���T�>�>����	�g�m�m�D�!�!��
�w�'����y��r�w�'�'�'�!�$�'�'�'�c����d}d�td��D]�}|d��fd�td��D����z}tj�||��}	tj|tjtjztjz��}tj|��tj	|��dS#t$rY��t$rYdSwxYwtd	���)
N�(accesstest_deleteme_fishfingers_custard_�$abcdefghijklmnopqrstuvwxyz0123456789�
�c3�@�K�|]}tj���V��dS�N)�random�choice)�.0�_�alphabets  �r!�	<genexpr>z)_test_writable_dir_win.<locals>.<genexpr>ds-�����!L�!L�a�&�-��"9�"9�!L�!L�!L�!L�!L�!Lr<�TFz3Unexpected condition testing for writable directory)
�range�joinrr�open�O_RDWR�O_CREAT�O_EXCL�close�unlink�FileExistsError�PermissionErrorr)rr*rGr8�file�fdrHs      @r!r9r9^s���:�H�5�H�
�2�Y�Y�����"�'�'�!L�!L�!L�!L�5��8�8�!L�!L�!L�L�L�L���w�|�|�D�$�'�'��	����r�y�2�:�5��	�A�B�B�B�
�H�R�L�L�L��I�d�O�O�O��4�4���	�	�	��D��	�	�	��5�5�5�
	�����G�
H�
H�Hs�)9C
�
C'�	C'�&C'�patternc���g}tj|��D]<\�}}tj||��}|��fd�|D�����=|S)z�Returns a list of absolute paths of files beneath path, recursively,
    with filenames which match the UNIX-style shell glob pattern.c3�X�K�|]$}tj��|��V��%dSrC)rrrL)rFr.�roots  �r!rIzfind_files.<locals>.<genexpr>�s3�����=�=��b�g�l�l�4��+�+�=�=�=�=�=�=r<)r�walk�fnmatch�filter�extend)rrWr/rG�files�matchesrZs      @r!�
find_filesrazsg����F��'�$�-�-�>�>���a���.���0�0���
�
�=�=�=�=�W�=�=�=�=�=�=�=��Mr<c��tj�|��rdStj�|��S)Nr)rr�islink�getsize�rs r!�	file_sizerf�s1��	�w�~�~�d�����q�
�7�?�?�4� � � r<c�:�tt|����SrC)rrfres r!�format_file_sizerh�s���y����'�'�'r<c��d}tj|��D]=\}}}|D]4}tj�||��}|t	|��z
}�5�>|S)Ng)rr[rrLrf)r�sizerZ�_dirsr_�filename�	file_paths       r!�directory_sizern�si���D� �g�d�m�m�)�)���e�U��	)�	)�H�����T�8�4�4�I��I�i�(�(�(�D�D�	)��Kr<c�:�tt|����SrC)rrnres r!�format_directory_sizerp�s���~�d�+�+�,�,�,r<)'r\r�os.pathrDr�
contextlibr�tempfiler�typingrrrrr	r
�pip._vendor.tenacityrrr
�pip._internal.utils.compatr�pip._internal.utils.miscr�str�boolr"r0�_replace_retry�replacer;r9ra�int�floatrfrhrnrpr)r<r!�<module>r~s�������	�	�	�	�����
�
�
�
�
�
�
�
�%�%�%�%�%�%�'�'�'�'�'�'�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�>�D�D�D�D�D�D�D�D�D�D�3�3�3�3�3�3�0�0�0�0�0�0��3��4�����6�&�C�&�3�&�9�X�t�T�=Q�3R�&�&�&���&�2��t�*:�*:�1�*=�*=�J�J�t�DT�DT�U�U�U��
�.���
$�
$��
(�C�(�D�(�(�(�(�$I��I��I�I�I�I�8�S��3��4��9�����!�C�!�E�#�u�*�-�!�!�!�!�(�3�(�3�(�(�(�(�����s�E�z�!2�����-��-��-�-�-�-�-�-r<

Youez - 2016 - github.com/yon3zu
LinuXploit