%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/__pycache__/posixpath.cpython-312.pyc

�

���f�D��f�dZdZdZdZdZdZdZdZdZddl	Z	ddl
Z
ddlZddlZdd	l�gd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zej(je_d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdadad�Z	ddl m!Z!d�Z"d�Z$dd�d �Z%d!�Z&e
jNd"k(Z(d%d#�Z)d$�Z*y#e#$rd�Z"Y�-wxYw)&a�Common operations on Posix pathnames.

Instead of importing this module directly, import os and refer to
this module as os.path.  The "os.path" name is an alias for this
module on Posix systems; on other systems (e.g. Windows),
os.path provides the same operations in a manner specific to that
platform, and is an alias to another module (e.g. ntpath).

Some of this can actually be useful on non-Posix systems too, e.g.
for manipulation of the pathname component of URLs.
�.�..�/�:z
/bin:/usr/binNz	/dev/null�)�*)(�normcase�isabs�join�
splitdrive�	splitroot�split�splitext�basename�dirname�commonprefix�getsize�getmtime�getatime�getctime�islink�exists�lexists�isdir�isfile�ismount�
expanduser�
expandvars�normpath�abspath�samefile�sameopenfile�samestat�curdir�pardir�sep�pathsep�defpath�altsep�extsep�devnull�realpath�supports_unicode_filenames�relpath�
commonpath�
isjunctionc�&�t|t�ryy)N�/r)�
isinstance�bytes��paths � /usr/lib/python3.12/posixpath.py�_get_sepr7)s���$�����c�,�tj|�S)z6Normalize case of pathname.  Has no effect under Posix��os�fspath)�ss r6rr4s��
�9�9�Q�<�r8c�d�tj|�}t|�}|j|�S)zTest whether a path is absolute)r;r<r7�
startswith)r=r%s  r6r	r	<s'��
�	�	�!��A�
�1�+�C��<�<���r8c�j�tj|�}t|�}|}	|s|dd|zttj|�D]7}|j	|�r|}�|r|j|�r||z
}�0|||zz
}�9	|S#tttf$rtjd|g|����wxYw)z�Join two or more pathname components, inserting '/' as needed.
    If any component is an absolute path, all previous path components
    will be discarded.  An empty last part will result in a path that
    ends with a separator.Nrr
)r;r<r7�mapr?�endswith�	TypeError�AttributeError�BytesWarning�genericpath�_check_arg_types)�a�pr%r5�bs     r6r
r
Gs���
	�	�	�!��A�
�1�+�C��D�����!�H�s�N��R�Y�Y��"�	 �A��|�|�C� ����T�]�]�3�/���	����a����
	 ��K��
�~�|�4���$�$�V�Q�3��3�
��s�AB�-B2c���tj|�}t|�}|j|�dz}|d|||d}}|r"||t	|�zk7r|j|�}||fS)z�Split a pathname.  Returns tuple "(head, tail)" where "tail" is
    everything after the final slash.  Either part may be empty.�N�r;r<r7�rfind�len�rstrip)rIr%�i�head�tails     r6r
r
dsk��	�	�	�!��A�
�1�+�C�	�����q��A��2�A���!�"��$�D����C��I�
�%��{�{�3�����:�r8c��tj|�}t|t�rd}d}nd}d}t	j
||d|�S)Nr1�.rr)r;r<r2r3rF�	_splitext)rIr%r)s   r6rrusD��
�	�	�!��A��!�U����������� � ��C��v�6�6r8c�:�tj|�}|dd|fS)zJSplit a pathname into drive and path. On Posix, drive is always
    empty.Nrr:)rIs r6rr�s ��	�	�	�!��A��R�a�5�!�8�Or8c��tj|�}t|t�rd}d}nd}d}|dd|k7r|||fS|dd|k7s|dd|k(r|||ddfS||dd|ddfS)	a�Split a pathname into drive, root and tail. On Posix, drive is always
    empty; the root may be empty, a single slash, or two slashes. The tail
    contains anything after the root. For example:

        splitroot('foo/bar') == ('', '', 'foo/bar')
        splitroot('/foo/bar') == ('', '/', 'foo/bar')
        splitroot('//foo/bar') == ('', '//', 'foo/bar')
        splitroot('///foo/bar') == ('', '/', '//foo/bar')
    r1r8r�NrL��)r;r<r2r3)rIr%�emptys   r6rr�s���	�	�	�!��A��!�U������������!�u��|��e�Q���	
�1�Q��3��!�A�a�&�C�-��c�1�Q�R�5� � ��a���e�Q�q�r�U�"�"r8c�t�tj|�}t|�}|j|�dz}||dS)z)Returns the final component of a pathnamerLN)r;r<r7rN)rIr%rQs   r6rr�s5��
�	�	�!��A�
�1�+�C�	�����q��A��Q�R�5�Lr8c��tj|�}t|�}|j|�dz}|d|}|r"||t	|�zk7r|j|�}|S)z-Returns the directory component of a pathnamerLNrM)rIr%rQrRs    r6rr�sZ��
�	�	�!��A�
�1�+�C�	�����q��A��R�a�5�D����C��I�
�%��{�{�3����Kr8c�.�tj|�y)zQTest whether a path is a junction
    Junctions are not a part of posix semanticsFr:r4s r6r/r/�s���I�I�d�O�r8c�Z�	tj|�y#ttf$rYywxYw)zCTest whether a path exists.  Returns True for broken symbolic linksFT)r;�lstat�OSError�
ValueErrorr4s r6rr�s0���
�������
�Z� ����s��*�*c��	tj|�}tj|j�rytj|�}t|t�r
t|d�}nt|d�}t|�}	tj|�}|j}|j}||k7ry|j}|j}||k(ryy#t
tf$rYywxYw#t
tf$rYywxYw)z$Test whether a path is a mount pointF�..rT)r;ra�stat�S_ISLNK�st_moderbrcr<r2r3r
r+�st_dev�st_ino)r5�s1�parent�s2�dev1�dev2�ino1�ino2s        r6rr�s����
�X�X�d�^���<�<��
�
�#��
�9�9�T�?�D��$����d�E�"���d�D�!��
�f�
�F��
�X�X�f�
���9�9�D�
�9�9�D��t�|��
�9�9�D�
�9�9�D��t�|����7
�Z� ����� 
�Z� ����s#�C�C(�C%�$C%�(C:�9C:c�`�tj|�}t|t�rd}nd}|j	|�s|St|�}|j
|d�}|dkrt|�}|dk(rZdtjvr4	ddl	}	|jtj��j}nXtjd}nD	ddl	}|d|}t|t�rt|d�}	|j!|�}|j}|�t"j$dk(r|St|t�rtj&|�}d	}nd
}|j)|�}|||dzxs|S#t$r|cYSwxYw#t$r|cYSwxYw#t$r|cYSwxYw#t$r|cYSwxYw)zOExpand ~ and ~user constructions.  If user or $HOME is unknown,
    do nothing.�~�~rLr�HOMEN�ASCII�vxworksr1r)r;r<r2r3r?r7�findrO�environ�pwd�ImportError�getpwuid�getuid�pw_dir�KeyError�str�getpwnam�sys�platform�fsencoderP)	r5�tilder%rQrz�userhome�name�pwent�roots	         r6rrs����9�9�T�?�D��$��������?�?�5�!���
�4�.�C��	�	�#�q��A��1�u���I���A�v�����#�
��
��<�<��	�	��4�;�;���z�z�&�)�H�	���A�a�y���d�E�"��t�W�%�D�	��L�L��&�E�
�<�<����C�L�L�I�5����$����;�;�x�(���������t�$�H��t�A�B�x��(�D�(��I�
���
��
�
���
���	��K�	���	��K�	�sH�E,�-E=�F�1F�,E:�9E:�=F�
F�F�F�F-�,F-c�,�tj|�}t|t�rRd|vr|Sts ddl}|j
d|j�atj}d}d}ttdd�}nPd|vr|Sts ddl}|j
d	|j�a
tj}d
}d}tj}d}	|||�}|s	|S|jd�\}}|jd�}	|	j|�r|	j|�r|	dd
}		|�:tj tjtj"|	��}
n||	}
||d}|d||
z}t%|�}||z
}��#t&$r|}Y�wxYw)zZExpand shell variables of form $var and ${var}.  Unknown variables
    are left unchanged.�$rNs\$(\w+|\{[^}]*\})�{�}�environb�$z\$(\w+|\{[^}]*\})�{�}rL���)r;r<r2r3�	_varprogb�re�compilerv�search�getattr�_varprogry�span�groupr?rBr��fsdecoderOr)r5r�r��start�endryrQ�m�jr��valuerSs            r6rr@s����9�9�T�?�D��$����t���K����
�
�#8�"�(�(�C�I��!�!�������"�j�$�/���d�?��K����z�z�"6����A�H����������*�*��	�A�
��4��O����"�K�!�v�v�a�y���1��w�w�q�z���?�?�5�!�d�m�m�C�&8���"�:�D�	������B�J�J�r�{�{�4�/@�$A�B����
�����8�D����8�e�#�D��D�	�A��D�L�D�'���	��A�	�s�&AF�F�F)�_path_normpathc���tj|�}t|t�r5tjttj|���xsdSt|�xsdS)�0Normalize path, eliminating double slashes, etc.rUr)r;r<r2r3r�r�r�r4s r6rr�sK���y�y�����d�E�"��;�;�~�b�k�k�$�.?�@�A�I�T�I��d�#�*�s�*r8c��tj|�}t|t�r	d}d}d}d}nd}d}d}d}||k(r|St	|�\}}}|j|�}g}|D]A}	|	||fvr�
|	|k7s|s|r
|r|d	|k(r|j
|	��/|s�2|j��C|}||j|�z}|xs|S)
r�r1r8rUrerrYrrr�)	r;r<r2r3rr
�append�popr
)
r5r%r\�dot�dotdot�_�initial_slashes�comps�	new_comps�comps
          r6rrys����y�y�����d�E�"��C��E��C��F��C��E��C��F��5�=��J�#,�T�?� ��?�D��
�
�3����	��	 �D���s�|�#������y��	�"�
�� 7�� � ��&���
�
��	 �������%��0���{�s�r8c���tj|�}t|�sEt|t�rtj
�}ntj�}t||�}t|�S)zReturn an absolute path.)	r;r<r	r2r3�getcwdb�getcwdr
r)r5�cwds  r6rr�sK��
�9�9�T�?�D���;��d�E�"��*�*�,�C��)�)�+�C��C�����D�>�r8F)�strictc�j�tj|�}t|dd||i�\}}t|�S)zlReturn the canonical path of the specified filename, eliminating any
symbolic links encountered in the path.Nr)r;r<�
_joinrealpathr)�filenamer�r5�oks    r6r+r+�s6���y�y��"�H��X�b�q�\�8�V�R�@�H�D�"��4�=�r8c��t|t�rd}d}d}nd}d}d}t|�r|dd}|}|�r|j|�\}}}|r||k(r� ||k(r&|r!t	|�\}}||k(rt|||�}n|}�Kt||�}		t
j|	�}
tj|
j�}|s|	}��|	|vr.||	}|���|rt
j|	�nt|	|�dfSd||	<t|t
j|	�||�\}}|st||�dfS|||	<|r��|d	fS#t$r|r�d}Y��wxYw)
Nr1rUrerrrrLFT)r2r3r	�	partitionr
r
r;rarfrgrhrbr��readlink)
r5�restr��seenr%r#r$r�r��newpath�st�is_linkr�s
             r6r�r��s����$����������������T�{��A�B�x����
����s�+�
��a���t�v�~���6�>��"�4�[�
��d��6�>���f�f�5�D�����t�T�"��	/����'�"�B��l�l�2�:�:�.�G���D���d�?���=�D��������� ��G�T�*�E�1�1���W�
� ��r�{�{�7�';�V�T�J���b����d�#�U�*�*���W�
�Y�\��:���;�	����G�	�s�D9�9E
�	E
�darwinc�P�|std��tj|�}t|t�rd}d}d}nd}d}d}|�|}ntj|�}	t|�j
|�D�cgc]}|s�|��	}}t|�j
|�D�cgc]}|s�|��	}}tt||g��}|gt|�|z
z||dz}	|	s|St|	�Scc}wcc}w#ttttf$rtjd	||��wxYw)
z#Return a relative version of a pathzno path specifiedrUr1rerrrNr-)rcr;r<r2r3rr
rOrr
rCrDrE�DeprecationWarningrFrG)
r5r�r#r%r$�x�
start_list�	path_listrQ�rel_lists
          r6r-r-�s,����,�-�-�
�9�9�T�?�D��$����������������}����	�	�%� ���!(���!5�!5�c�!:�@�A�a�a�@�
�@� '��
� 3� 3�C� 8�>�1�A�Q�>�	�>���j�)�4�5�6���8�s�:��q�0�1�I�a�b�M�A����M��X����A��>��
�~�|�5G�H���$�$�Y��e�<�
��s<�C3�7C)�?C)�C3�!C.�)C.�-3C3�!C3�)
C3�32D%c	���|std��tttj|��}t|dt�rd�d}nd�d}	|D�cgc]}|j����}}	t�fd�|D��\}|D��cgc]}|D�cgc]
}|s�||k7s�|��c}��}}}t|�}t|�}|}	t|�D]\}
}|||
k7s�|d	|
}	n|r�n�d	d}|�j|	�zScc}w#t$r
td�d	�wxYwcc}wcc}}w#ttf$rtj d
g|����wxYw)zDGiven a sequence of path names, returns the longest common sub-path.z%commonpath() arg is an empty sequencerr1rUrrc3�.�K�|]}|dd�k(���y�w)NrL�)�.0rIr%s  �r6�	<genexpr>zcommonpath.<locals>.<genexpr>4s�����5�!��2�A��#��5�s�z%Can't mix absolute and relative pathsNr.)rc�tuplerAr;r<r2r3r
�set�min�max�	enumerater
rCrDrFrG)
�pathsr#r5�split_pathsr	r=�crkrm�commonrQ�prefixr%s
            @r6r.r."st�����@�A�A��#�b�i�i��'�(�E��%��(�E�"����������38�9�4�t�z�z�#��9��9�	P��5�u�5�5�F�E�EP�P�q�1�:�a��a�6�k��:�P��P�
��
��
��
�����b�M�	�D�A�q��B�q�E�z��B�Q����	�
��3�r��7�������(�(�(��#:���	P��D�E�4�O�	P��;��P��
�~�&���$�$�\�:�E�:�
��sl�D,�D�+D,�.D�D,�		D&�D!�D!� D!�$D&�)4D,�$D,�D,�D�D,�!D&�&D,�,'E)N)+�__doc__r#r$r)r%r&r'r(r*r;r�rfrF�__all__r7rr	r
r
rrVrrrrr/rrrr�r�r�posixr�rr{rr+r�r�r,r-r.r�r8r6�<module>r�s��
�

��	
��	��	��

��
��	
��
��	�
����'������:	�"7��(�(�0�0���
�#�>�����V6)�z���	�.�j(+�$�D+�	�"'��<�~"�l�l�h�6��!�R#��U����s�9B%�%B0�/B0

Zerion Mini Shell 1.0