%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/posixpath.cpython-311.pyc

�

c��fuB��F�dZdZdZdZdZdZdZdZdZddl	Z	ddl
Z
ddlZddlZdd	lTgd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zejje_d�Zd�Zd�Zd�Zd�Zd�Zd�Zdadad�Z	ddlm Z d�Z!n#e"$rd�Z!YnwxYwd�Z#dd�d�Z$d �Z%e
j&d!kZ'd$d"�Z(d#�Z)dS)%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�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�
commonpathc�4�t|t��rdSdS)N�/r)�
isinstance�bytes��paths �0/opt/alt/python311/lib64/python3.11/posixpath.py�_get_sepr5)s���$������t��s�c�*�tj|��S)z6Normalize case of pathname.  Has no effect under Posix��os�fspath)�ss r4rr4s��
�9�Q�<�<�r6c�r�tj|��}t|��}|�|��S)zTest whether a path is absolute)r9r:r5�
startswith)r;r$s  r4r	r	<s,��
�	�!���A�
�1�+�+�C��<�<����r6c��tj|��}t|��}|}	|s
|dd�|zttj|��D]?}|�|��r|}�|r|�|��r||z
}�7|||zz
}�@n/#tttf$rtj
d|g|�R��wxYw|S)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
)r9r:r5�mapr=�endswith�	TypeError�AttributeError�BytesWarning�genericpath�_check_arg_types)�a�pr$r3�bs     r4r
r
Gs���
	�	�!���A�
�1�+�+�C��D���	���!��H�s�N�N��R�Y��"�"�	 �	 �A��|�|�C� � �
 �����
 �T�]�]�3�/�/�
 ���	�����a�����
	 ��
�~�|�4�����$�V�Q�3��3�3�3�3�
������Ks�A)B�,B=c��tj|��}t|��}|�|��dz}|d|�||d�}}|r+||t	|��zkr|�|��}||fS)z�Split a pathname.  Returns tuple "(head, tail)" where "tail" is
    everything after the final slash.  Either part may be empty.�N�r9r:r5�rfind�len�rstrip)rGr$�i�head�tails     r4rrds���	�	�!���A�
�1�+�+�C�	������q��A��2�A�2���!�"�"��$�D�� ���C��I�I�
�%�%��{�{�3������:�r6c��tj|��}t|t��rd}d}nd}d}t	j||d|��S)Nr/�.rr)r9r:r0r1rD�	_splitext)rGr$r(s   r4r
r
usN��
�	�!���A��!�U�������������� ��C��v�6�6�6r6c�B�tj|��}|dd�|fS)zJSplit a pathname into drive and path. On Posix, drive is always
    empty.Nrr8)rGs r4rr�s"��	�	�!���A��R�a�R�5�!�8�Or6c��tj|��}t|��}|�|��dz}||d�S)z)Returns the final component of a pathnamerJN)r9r:r5rL)rGr$rOs   r4rr�s;��
�	�!���A�
�1�+�+�C�	������q��A��Q�R�R�5�Lr6c���tj|��}t|��}|�|��dz}|d|�}|r+||t	|��zkr|�|��}|S)z-Returns the directory component of a pathnamerJNrK)rGr$rOrPs    r4rr�sm��
�	�!���A�
�1�+�+�C�	������q��A��R�a�R�5�D�� ���C��I�I�
�%�%��{�{�3�����Kr6c��	tj|��}n#tttf$rYdSwxYwtj|j��S)z&Test whether a path is a symbolic linkF)r9�lstat�OSError�
ValueErrorrB�stat�S_ISLNK�st_mode)r3�sts  r4rr�sQ���
�X�d�^�^�����Z��0�����u�u������<��
�#�#�#s��2�2c�b�	tj|��n#ttf$rYdSwxYwdS)zCTest whether a path exists.  Returns True for broken symbolic linksFT)r9rYrZr[r2s r4rr�sB���
���������Z� �����u�u������4s��,�,c��	tj|��}tj|j��rdSn#t
tf$rYdSwxYwtj|��}t|t��rt|d��}nt|d��}t|��}	tj|��}n#t
tf$rYdSwxYw|j}|j}||krdS|j
}|j
}||krdSdS)z$Test whether a path is a mount pointF�..rT)r9rYr\r]r^rZr[r:r0r1r
r*�st_dev�st_ino)r3�s1�parent�s2�dev1�dev2�ino1�ino2s        r4rr�s'���
�X�d�^�^���<��
�#�#�	��5�	��
�Z� �����u�u������9�T�?�?�D��$����"��d�E�"�"����d�D�!�!��
�f�
�
�F��
�X�f�
�
�����Z� �����u�u������9�D�
�9�D��t�|�|��t�
�9�D�
�9�D��t�|�|��t��5s!�2�A�A�$B9�9C�
Cc��tj|��}t|t��rd}nd}|�|��s|St|��}|�|d��}|dkrt|��}|dkrxdtjvrW	ddl	}n#t$r|cYSwxYw	|�tj����j
}n�#t$r|cYSwxYwtjd}nw	ddl	}n#t$r|cYSwxYw|d|�}t|t��rt|d��}	|�|��}n#t$r|cYSwxYw|j
}|�t"jdkr|St|t��rtj|��}d	}nd
}|�|��}|||d�zp|S)zOExpand ~ and ~user constructions.  If user or $HOME is unknown,
    do nothing.�~�~rJr�HOMEN�ASCII�vxworksr/r)r9r:r0r1r=r5�findrM�environ�pwd�ImportError�getpwuid�getuid�pw_dir�KeyError�str�getpwnam�sys�platform�fsencoderN)	r3�tilder$rOrt�userhome�name�pwent�roots	         r4rr�s3���9�T�?�?�D��$�����������?�?�5�!�!����
�4�.�.�C��	�	�#�q���A��1�u�u���I�I���A�v�v����#�#�
��
�
�
�
���
�
�
�����
����
��<�<��	���4�4�;�����
�
�
�����
����
�z�&�)�H�H�	��J�J�J�J���	�	�	��K�K�K�	�����A�a�C�y���d�E�"�"�	&��t�W�%�%�D�	��L�L��&�&�E�E���	�	�	��K�K�K�	�����<����C�L�I�5�5����$������;�x�(�(����������t�$�$�H��t�A�B�B�x��(�D�(sH�B�B)�(B)�-+C�C(�'C(�?D�D�D�E�E+�*E+c�v�tj|��}t|t��rSd|vr|Stsddl}|�d|j��atj}d}d}ttdd��}nHd|vr|Stsddl}|�d	|j��a
tj}d
}d}tj}d}	|||��}|sn�|�d��\}}|�
d
��}	|	�|��r|	�|��r
|	d
d�}		|�7tjtjtj|	����}
n||	}
||d�}|d|�|
z}t%|��}||z
}n#t&$r|}YnwxYw��|S)zZExpand shell variables of form $var and ${var}.  Unknown variables
    are left unchanged.�$rNs\$(\w+|\{[^}]*\})�{�}�environb�$z\$(\w+|\{[^}]*\})�{�}TrJ���)r9r:r0r1�	_varprogb�re�compilerp�search�getattr�_varprogrs�span�groupr=r@r~�fsdecoderMry)r3r�r��start�endrsrO�m�jr��valuerQs            r4rr%s����9�T�?�?�D��$������t����K��	D��I�I�I��
�
�#8�"�(�C�C�I��!�������"�j�$�/�/����d�?�?��K��	B��I�I�I��z�z�"6���A�A�H���������*��	�A���F�4��O�O���	���v�v�a�y�y���1��w�w�q�z�z���?�?�5�!�!�	�d�m�m�C�&8�&8�	���"��:�D�	�����B�J�r�{�4�/@�/@�$A�B�B�����
������8�D�����8�e�#�D��D�	�	�A��D�L�D�D��
�	�	�	��A�A�A�	�����(�Ks�9AF&�&F5�4F5)�_path_normpathc���tj|��}t|t��r5tjttj|������pdSt|��pdS)�0Normalize path, eliminating double slashes, etc.rSr)r9r:r0r1r~r�r�r2s r4rr�s\���y������d�E�"�"�	J��;�~�b�k�$�.?�.?�@�@�A�A�I�T�I��d�#�#�*�s�*r6c�0�tj|��}t|t��r	d}d}d}d}nd}d}d}d}||kr|S|�|��}|r2|�|d	z��r|�|d
z��sd	}|�|��}g}|D]M}|||fvr�	||ks|s|r|r"|d|kr|�|���7|r|����N|}|�|��}|r||z|z}|p|S)r�r/r6rSrbr�rr��r�)	r9r:r0r1r=r�append�popr
)	r3r$�empty�dot�dotdot�initial_slashes�comps�	new_comps�comps	         r4rr^sh���y������d�E�"�"�		��C��E��C��F�F��C��E��C��F��5�=�=��J��/�/�#�.�.��
�	 ��O�O�C��E�"�"�	 �+/�?�?�3�q�5�+A�+A�	 ��O��
�
�3�����	��	 �	 �D���s�|�#�#��������y���� )�"�
�� 7� 7�� � ��&�&�&�&��
 ��
�
��������x�x������	.���&��-�D��{�s�r6c��tj|��}t|��sLt|t��rtj��}ntj��}t||��}t|��S)zReturn an absolute path.)	r9r:r	r0r1�getcwdb�getcwdr
r)r3�cwds  r4rr�s`��
�9�T�?�?�D���;�;���d�E�"�"�	��*�,�,�C�C��)�+�+�C��C������D�>�>�r6F)�strictc��tj|��}t|dd�||i��\}}t|��S)zlReturn the canonical path of the specified filename, eliminating any
symbolic links encountered in the path.Nr)r9r:�
_joinrealpathr)�filenamer�r3�oks    r4r*r*�s>���y��"�"�H��X�b�q�b�\�8�V�R�@�@�H�D�"��4�=�=�r6c���t|t��rd}d}d}nd}d}d}t|��r|dd�}|}|�r0|�|��\}}}|r||kr�%||kr/|r*t	|��\}}||krt|||��}n|}�Zt||��}		t
j|	��}
tj	|
j
��}n#t$r|r�d}YnwxYw|s|	}��|	|vr4||	}|���|rt
j|	��nt|	|��dfSd||	<t|t
j
|	��||��\}}|st||��dfS|||	<|��0|d	fS)
Nr/rSrbrrrrJFT)r0r1r	�	partitionrr
r9rYr\r]r^rZr��readlink)
r3�restr��seenr$r"r#r��_�newpathr_�is_linkr�s
             r4r�r��s����$�������������������T�{�{���A�B�B�x����
�,����s�+�+�
��a���	�t�v�~�~���6�>�>��
�"�4�[�[�
��d��6�>�>���f�f�5�5�D������t�T�"�"��	/���'�"�"�B��l�2�:�.�.�G�G���	�	�	��
���G�G�G�	�����	��D���d�?�?���=�D�����
2���� � � � ��G�T�*�*�E�1�1���W�
� ��r�{�7�';�';�V�T�J�J���b��	+���d�#�#�U�*�*���W�
�Y�,�\��:�s�)C�C)�(C)�darwinc�|�|std���tj|��}t|t��rd}d}d}nd}d}d}|�|}ntj|��}	d	�t|���|��D��}d
�t|���|��D��}tt||g����}|gt|��|z
z||d�z}|s|St|�S#ttttf$rtjd||���wxYw)z#Return a relative version of a pathzno path specifiedrSr/rbrrrNc��g|]}|�|��S�r���.0�xs  r4�
<listcomp>zrelpath.<locals>.<listcomp>�s��@�@�@�A�a�@�a�@�@�@r6c��g|]}|�|��Sr�r�r�s  r4r�zrelpath.<locals>.<listcomp>�s��>�>�>�1�A�>�Q�>�>�>r6r,)r[r9r:r0r1rrrMrr
rArBrC�DeprecationWarningrDrE)	r3r�r"r$r#�
start_list�	path_listrO�rel_lists	         r4r,r,�sZ���.��,�-�-�-�
�9�T�?�?�D��$�������������������}�����	�%� � ���@�@�����!5�!5�c�!:�!:�@�@�@�
�>�>���
�
� 3� 3�C� 8� 8�>�>�>�	���j�)�4�5�5�6�6���8�s�:���q�0�1�I�a�b�b�M�A���	��M��X�����~�|�5G�H�����$�Y��e�<�<�<�
����s�"BD�=D�5D;c��	�
�|std���tttj|����}t|dt��rd�
d�	nd�
d�		�
fd�|D��}	t�
fd�|D����\}n#t$rtd	��d
�wxYw�	fd�|D��}t|��}t|��}|}t|��D]\}}|||kr|d
|�}n�|r�
n	�
d
d�}|�
�|��zS#ttf$rtjdg|�R��wxYw)
zDGiven a sequence of path names, returns the longest common sub-path.z%commonpath() arg is an empty sequencerr/rSrrc�:��g|]}|������Sr�)r)r�r3r$s  �r4r�zcommonpath.<locals>.<listcomp>s#���9�9�9�4�t�z�z�#���9�9�9r6c3�4�K�|]}|dd��kV��dS)NrJr�)r�rGr$s  �r4�	<genexpr>zcommonpath.<locals>.<genexpr>!s/�����5�5�!��2�A�2��#��5�5�5�5�5�5r6z%Can't mix absolute and relative pathsNc�,��g|]}�fd�|D����S)c�$��g|]}|�|�k�
|��
Sr�r�)r��cr"s  �r4r�z)commonpath.<locals>.<listcomp>.<listcomp>%s#���:�:�:�a��:�a�6�k�k��k�k�kr6r�)r�r;r"s  �r4r�zcommonpath.<locals>.<listcomp>%s.���P�P�P�q�:�:�:�:�1�:�:�:�P�P�Pr6r-)r[�tupler?r9r:r0r1�set�min�max�	enumerater
rArBrDrE)�paths�split_pathsr	rerg�commonrOr��prefixr"r$s         @@r4r-r-s������B��@�A�A�A��#�b�i��'�'�(�(�E��%��(�E�"�"������������9�9�9�9�5�9�9�9��	P��5�5�5�5�u�5�5�5�5�5�F�E�E���	P�	P�	P��D�E�E�4�O�	P����Q�P�P�P�K�P�P�P��
��
�
��
��
�
�����b�M�M�	�	�D�A�q��B�q�E�z�z��B�Q�B�������*���3�r��r�7�������(�(�(�(���~�&�����$�\�:�E�:�:�:�:�
����s%� D,�/B
�D,�
B(�(BD,�,%E)N)*�__doc__r"r#r(r$r%r&r'r)r9r|r\rD�__all__r5rr	r
rr
rTrrrrrrrr�r�r�posixr�rrurr*r�r}r+r,r-r�r6r4�<module>r�sL��
�
�

��	
��	��	��

��
��	
��
��	�	�	�	�
�
�
�
�����������������������������:	�	�	�"7�7�7��(�0���
���������$�$�$�������V6)�6)�6)�z���	�.�.�.�j0+�$�$�$�$�$�$�T+�+�+�+��Q�%�%�%�$�$�$�$�$�%����`	�	�	�"'������<�<�<�~"�l�h�6��!�!�!�!�R#�#�#�#�#s�+A5�5B�?B

Zerion Mini Shell 1.0