HEX
Server: Apache
System: Linux server-634962.emtiyz.com 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: codo66ho (1003)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib64/python3.9/__pycache__/ntpath.cpython-39.pyc
a

�i\g�@s�dZdZdZdZdZdZdZdZdZdd	l	Z	dd	l
Z
dd	lZdd	lZdd
lTgd�Z
dd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zejje_dd�Zdd�Zdd�Zd d!�Zzdd"lmZWney�d	ZYn0d#d$�Zd%d&�Zd'Zd	a d	a!d(d)�Z"d*d+�Z#d,d-�Z$zdd.lm%Z%Wne�y:e$Z&Yn
0d/d0�Z&zdd1lm'Z'm(Z)Wn"e�yzd2d3�d4d5�Z*Yn(0e+fd6d7�Z,e+fd8d9�Z-d2d3�d:d5�Z*e.e
d;��o�e
�/�d<d=kZ0dCd>d?�Z1d@dA�Z2zddBlm3Z4Wne�y�Yn0d	S)Dz�Common pathname manipulations, WindowsNT/95 version.

Instead of importing this module directly, import os and refer to this
module as os.path.
�.�..�\�;�/z.;C:\bin�nul�N)�*)'�normcase�isabs�join�
splitdrive�split�splitext�basename�dirname�commonprefix�getsize�getmtime�getatime�getctime�islink�exists�lexists�isdir�isfile�ismount�
expanduser�
expandvars�normpath�abspath�curdir�pardir�sep�pathsep�defpath�altsep�extsep�devnull�realpath�supports_unicode_filenames�relpath�samefile�sameopenfile�samestat�
commonpath�
ALLOW_MISSINGcCst|t�rdSdSdS)N�\/�\/)�
isinstance�bytes��path�r6�/usr/lib64/python3.9/ntpath.py�
_get_bothseps#s
r8cCs8t�|�}t|t�r$|�dd���S|�dd���SdS)zaNormalize case of pathname.

    Makes all characters lowercase and all slashes into backslashes.�/�\rrN)�os�fspathr2r3�replace�lower��sr6r6r7r	-s

r	cCsjt�|�}t|t�r,|�dd��d�rBdSn|�dd��d�rBdSt|�d}t|�d	koh|d	t|�vS)
zTest whether a path is absoluter9r:�\\?\Trr�\\?\�r)	r;r<r2r3r=�
startswithr�lenr8r?r6r6r7r
>s

r
c

GsTt�|�}t|t�r"d}d}d}nd}d}d}z�|sD|dd�|t|�\}}ttj|�D]~}t|�\}}	|	r�|	d|vr�|s�|s�|}|	}q\n*|r�||kr�|��|��kr�|}|	}q\|}|r�|d|vr�||}||	}q\|�r|d|v�r|�r|dd�|k�r|||WS||WSttt	f�yNt
jd	|g|�R��Yn0dS)
Nr:r0�:rr1�:r���r)r;r<r2r3r�mapr>�	TypeError�AttributeError�BytesWarning�genericpath�_check_arg_types)
r5�pathsr"�seps�colon�result_drive�result_path�p�p_drive�p_pathr6r6r7rNsL


��
rcCst�|�}t|�dk�rt|t�r0d}d}d}nd}d}d}|�||�}|dd�|dkr�|dd	�|kr�|�|d�}|d
kr�|dd�|fS|�||d�}||dkr�|dd�|fS|d
kr�t|�}|d|�||d�fS|dd�|k�r|dd�|dd�fS|dd�|fS)
a�Split a pathname into drive/UNC sharepoint and relative path specifiers.
    Returns a 2-tuple (drive_or_unc, path); either part may be empty.

    If you assign
        result = splitdrive(p)
    It is always true that:
        result[0] + result[1] == p

    If the path contained a drive letter, drive_or_unc will contain everything
    up to and including the colon.  e.g. splitdrive("c:/dir") returns ("c:", "/dir")

    If the path contained a UNC path, the drive_or_unc will contain the host name
    and share up to but not including the fourth directory separator character.
    e.g. splitdrive("//host/computer/dir") returns ("//host/computer", "/dir")

    Paths cannot contain both a drive letter and a UNC path.

    �r:r9rFrrrGr�rHNrC)r;r<rEr2r3r=�find)rTr"r%rQ�normp�index�index2r6r6r7r}s.

$rcCsxt�|�}t|�}t|�\}}t|�}|rD||d|vrD|d8}q&|d|�||d�}}|�|�pj|}|||fS)z~Split a pathname.

    Return tuple (head, tail) where tail is everything after the final slash.
    Either part may be empty.rCN)r;r<r8rrE�rstrip)rTrP�d�i�head�tailr6r6r7r
�s

r
cCs8t�|�}t|t�r$t�|ddd�St�|ddd�SdS)Nr:r9�.rrr)r;r<r2r3rM�	_splitext�rTr6r6r7r�s

rcCst|�dS)z)Returns the final component of a pathnamerC�r
rdr6r6r7r�srcCst|�dS)z-Returns the directory component of a pathnamerrerdr6r6r7r�src
Cs6zt�|�}Wntttfy(YdS0t�|j�S)zhTest whether a path is a symbolic link.
    This will always return false for Windows prior to 6.0.
    F)r;�lstat�OSError�
ValueErrorrK�stat�S_ISLNK�st_mode�r5�str6r6r7r�s
rc	Cs,zt�|�}Wnttfy&YdS0dS)zCTest whether a path exists.  Returns True for broken symbolic linksFT)r;rfrgrhrlr6r6r7r�s
r)�_getvolumepathnamecCstt�|�}t|�}t|�}t|�\}}|rD|d|vrD|pB||vS||vrPdStrl|�|�t|��|�kSdSdS)zaTest whether a path is a mount point (a drive root, the root of a
    share, or a mounted volume)rTFN)r;r<r8rrrnr])r5rP�root�restr6r6r7rs
rcCs�t�|�}t|t�rd}nd}|�|�s,|Sdt|�}}||kr\||t|�vr\|d7}q:dtjvrrtjd}nDdtjvr�|Sztjd}Wnty�d}Yn0t	|tjd�}t|t�r�t�
|�}|dkr�t	t|�|d|��}|||d�S)	zLExpand ~ and ~user constructs.

    If user or $HOME is unknown, do nothing.�~�~rC�USERPROFILE�HOMEPATH�	HOMEDRIVE�N)r;r<r2r3rDrEr8�environ�KeyErrorr�fsencoder)r5�tilder_�n�userhome�driver6r6r7r"s.








rz.'[^']*'?|%(%|[^%]*%?)|\$(\$|[-\w]+|\{[^}]*\}?)cs�t�|�}t|t�rjd|vr(d|vr(|StsHddl}|�t��|j	�j
at}d�d�d�d�ttdd��nJd|vr~d	|vr~|Sts�ddl}|�t|j	�j
at}d	�d
�d�d�tj
������fdd
�}|||�S)zfExpand shell variables of the forms $var, ${var} and %var%.

    Unknown variables are left unchanged.�$�%rN�{�}�environb�$�%�{�}cs�|j}|dur|dS||}|dkrR|�kr2|S|���sD|dS|dd�}n4|�kr^|S|���r�|���sz|dS|dd�}z.�dur�t�tjt�|��WS�|WSWnty�|dYS0dS)NrrCrH)�	lastindex�endswithrDr;ryrw�fsdecoderx)�mr��name��brace�dollarrw�percent�rbracer6r7�replus,


zexpandvars.<locals>.repl)r;r<r2r3�_varsubb�re�compile�_varpattern�encode�ASCII�sub�getattr�_varsubrw)r5r�r�r�r6r�r7rVs4

rc	CsPt�|�}t|t�r*d}d}d}d}d}nd}d}d}d	}d
}|�|�rL|S|�||�}t|�\}}|�|�r�||7}|�|�}|�|�}d}|t	|�k�r,||r�|||kr�||=q�|||k�r"|dkr�||d|kr�||d|d�=|d8}n&|dk�r|�
|��r||=n|d7}q�|d7}q�|�sB|�sB|�|�||�|�S)
z0Normalize path, eliminating double slashes, etc.r:r9rb�..)s\\.\rArrrr)z\\.\rBrrC)
r;r<r2r3rDr=r�lstripr
rEr��appendr)	r5r"r%r r!�special_prefixes�prefix�compsr_r6r6r7r�sF









rcCs@t�|�}t|�s8t|t�r&t��}nt��}t||�}t|�S)z�Return the absolute version of a path as a fallback function in case
    `nt._getfullpathname` is not available or raises OSError. See bpo-31047 for
    more.

    )	r;r<r
r2r3�getcwdb�getcwdrr)r5�cwdr6r6r7�_abspath_fallback�s



r�)�_getfullpathnamec	Cs2ztt|��WSttfy,t|�YS0dS)z&Return the absolute version of a path.N)rr�rgrhr�r4r6r6r7r�sr)�_getfinalpathname�readlinkF)�strictcCst|�S�N)r)r5r�r6r6r7r(�sr(c
Cs�d}t�}t|�|vr�|�t|��z:|}t|�}t|�s\t|�sJ|}Wq�ttt|�|��}Wq
|y�}z$|j	|vr�WYd}~q��WYd}~q
d}~0t
y�Yq�Yq
0q
|S)N)rCrWrX��� �2�C�Wi&i(i))�setr	�add�_nt_readlinkr
rrrr�winerrorrh)r5�
ignored_error�allowed_winerror�seenZold_path�exr6r6r7�_readlink_deep�s&
r�cCs�d}d}|r�zt|�}|r$t||�n|WS|y�}z�|j|vrD�z8t||d�}||krz|rht||�n|WWYd}~SWn|y�Yn0t|�\}}|r�|s�||WYd}~S|r�t||�n|}WYd}~qd}~00q|S)N)rCrWrXr�r�r�r��5�Ar�r��{�i�i�rv�r�)r�rr�r�r
)r5r�r�rar��new_pathr�r6r6r7�_getfinalpathname_nonstricts,
�$*r�c
Cs�t|�}t|t�rBd}d}d}t��}t|�tt�t��krjdSn(d}d}d}t��}t|�tt�krjdS|�	|�}|t
ur�t}d	}n|r�d
}nt}|s�t
|�s�t||�}zt|�}d}Wn6|y�}	z|	j}t||d�}WYd}	~	n
d}	~	00|�s�|�	|��r�|�	|��r&||t|�d�}
n|t|�d�}
zt|
�|k�rJ|
}Wn6t�y�}	z|	j|k�rn|
}WYd}	~	n
d}	~	00|S)
NrAs\\?\UNC\s\\s\\.\NULrBz\\?\UNC\z\\z\\.\NULTr6rr�)rr2r3r;r�r	ryr'r�rDr/�FileNotFoundErrorrgr
rr�r�r�rE)r5r�r�Z
unc_prefixZnew_unc_prefixr�Z
had_prefixr�Zinitial_winerrorr�Zspathr6r6r7r(KsT


��getwindowsversionrXrWcCsdt�|�}t|t�r"d}d}d}nd}d}d}|dur:|}|sFtd��t�|�}z�tt|��}tt|��}t|�\}}t|�\}	}
t|�t|	�kr�td	|	|f��d
d�|�	|�D�}dd�|
�	|�D�}d
}
t
||�D]$\}}t|�t|�kr�q�|
d7}
q�|gt|�|
||
d�}|�s(|WSt|�WSt
ttttf�y^t�d||��Yn0dS)z#Return a relative version of a pathr:rbr�rrrNzno path specifiedz&path is on mount %r, start on mount %rcSsg|]}|r|�qSr6r6��.0�xr6r6r7�
<listcomp>��zrelpath.<locals>.<listcomp>cSsg|]}|r|�qSr6r6r�r6r6r7r��r�rrCr*)r;r<r2r3rhrrrr	r
�ziprErrJrKrL�DeprecationWarningrMrN)r5�startr"r r!�	start_abs�path_abs�start_drive�
start_rest�
path_drive�	path_rest�
start_list�	path_listr_�e1�e2�rel_listr6r6r7r*�sH


�

r*c	s�|std��tttj|��}t|dt�r8d�d�d�nd�d�d��z>��fd	d
�|D�}�fdd
�|D�}zt�fdd
�|D��\}Wnty�td�d�Yn0ttdd
�|D���dkr�td��t	|d�
����\}}|���}�fdd
�|D�}�fdd
�|D�}t|�}t
|�}t|�D]*\}	}
|
||	k�r(|d|	�}�qd�q(|dt|��}|�rr|�n|}|��|�WSttf�y�tjdg|�R��Yn0dS)zDGiven a sequence of path names, returns the longest common sub-path.z%commonpath() arg is an empty sequencerr:r9rbrrrcs g|]}t|��������qSr6)rr=r>)r�rT)r%r"r6r7r��r�zcommonpath.<locals>.<listcomp>csg|]\}}|����qSr6re�r�r^rT�r"r6r7r��r�c3s"|]\}}|dd��kVqdS)NrCr6r�r�r6r7�	<genexpr>�r�zcommonpath.<locals>.<genexpr>z%Can't mix absolute and relative pathsNcss|]\}}|VqdSr�r6r�r6r6r7r��r�rCzPaths don't have the same drivecsg|]}|r|�kr|�qSr6r6�r��c�r r6r7r��r�csg|]}�fdd�|D��qS)csg|]}|r|�kr|�qSr6r6r�r�r6r7r��r�z)commonpath.<locals>.<listcomp>.<listcomp>r6)r�r@r�r6r7r��r�r.)rh�tuplerIr;r<r2r3r�rErr=r
�min�max�	enumeraterrJrKrMrN)rO�drivesplits�split_pathsr
r}r5�common�s1�s2r_r�r�r6)r%r r"r7r.�sF

r.)�_isdir)N)5�__doc__r r!r&r"r#r%r$r'r;�sysrirM�__all__r8r	r
rrr
rrcrrrr�ntrn�ImportErrorrrr�r�r�rrr�r�rr�r�r�r(rgr�r��hasattrr�r)r*r.r�rr6r6r6r7�<module>sv		
/8

0A2
*2<�
84