AlkantarClanX12

Your IP : 18.116.14.48


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/pathlib.cpython-310.opt-2.pyc

o

6��f���@s4ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZm
Z
mZmZmZddlmZddlmZmZmZmZmZmZmZddlmZgd�ZdZd	Z d
Z!e
eeefZ"ee e!fZ#dd�Z$d
d�Z%Gdd�de&�Z'Gdd�de'�Z(Gdd�de'�Z)e(�Z*e)�Z+Gdd�d�Z,Gdd�de,�Z-e-�Z.dd�Z/e0ed�r�e�1�e/�Z/Gdd�d�Z2Gdd�d�Z3Gd d!�d!e2�Z4Gd"d#�d#e2�Z5Gd$d%�d%e2�Z6Gd&d'�d'e
�Z7Gd(d)�d)e&�Z8ej9�:e8�Gd*d+�d+e8�Z;Gd,d-�d-e8�Z<Gd.d/�d/e8�Z=Gd0d1�d1e=e;�Z>Gd2d3�d3e=e<�Z?dS)4�N)�Sequence)�EINVAL�ENOENT�ENOTDIR�EBADF�ELOOP)�
attrgetter)�S_ISDIR�S_ISLNK�S_ISREG�S_ISSOCK�S_ISBLK�S_ISCHR�S_ISFIFO)�quote_from_bytes)�PurePath�
PurePosixPath�PureWindowsPath�Path�	PosixPath�WindowsPath��{i�cCs t|dd�tvpt|dd�tvS)N�errno�winerror)�getattr�_IGNORED_ERROS�_IGNORED_WINERRORS)Z	exception�r�./opt/alt/python310/lib64/python3.10/pathlib.py�
_ignore_error&s�r cCsd|vpd|vpd|vS)N�*�?�[r)�patrrr�_is_wildcard_pattern+sr%c@s&eZdZ	dd�Zdd�Zdd�ZdS)�_FlavourcCs|jj|_dS�N)�sep�join��selfrrr�__init__5�z_Flavour.__init__cCsg}|j}|j}d}}t|�}|D]c}|sq|r|�||�}|�|�\}}}	||	vrDt|	�|��D]}
|
rB|
dkrB|�t�|
��q2n|	rR|	dkrR|�t�|	��|sV|ru|ss|D]}|s_qZ|rg|�||�}|�|�d}|rrnqZnq|sz|r�|�||�|�	�|||fS)N��.r)
r(�altsep�reversed�replace�	splitroot�split�append�sys�intern�reverse)r+�partsZparsedr(r0�drv�root�it�partZrel�xrrr�parse_parts8sH����
z_Flavour.parse_partscCs|	|r|s|r||||g|dd�fSn#|r2||ks&|�|�|�|�kr1||||dd�fSn||||fS|||fS�N�)�casefold)r+r:r;r9Zdrv2Zroot2Zparts2rrr�join_parsed_parts^s��
z_Flavour.join_parsed_partsN)�__name__�
__module__�__qualname__r,r?rCrrrrr&1s
&r&c@s�eZdZdZdZdZeZej	dkZ
ed�ZdZ
hd�dd	�d
D�Bdd	�d
D�BZefdd
�Zdd�Zdd�Zdd�Ze
fdd�Zdd�Zdd�ZdS)�_WindowsFlavour�\�/T�ntZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZz\\?\>ZAUXZCONZNULzCONIN$ZPRNzCONOUT$cC�h|]}d|�qS)zCOM%sr��.0�crrr�	<setcomp>��z_WindowsFlavour.<setcomp>u123456789¹²³cCrK)zLPT%srrLrrrrO�rPcCsV|dd�}|dd�}||kr(||kr(|�|�\}}|dd�}|dd�}nd}|dd�}||kr~||kr~||kr~|�|d�}|dkr~|�||d�}||dkr~|dkr\t|�}|ro||d|�|||dd�fS|d|�|||dd�fSd}	}
|dkr�||jvr�|dd�}	|dd�}|}||kr�|}
|�|�}||	|
|fS)NrrA�r.�����:)�_split_extended_path�find�len�
drive_letters�lstrip)r+r=r(�first�second�prefixZthird�indexZindex2r:r;rrrr3�s6"
z_WindowsFlavour.splitrootcCs|��Sr'��lower�r+�srrrrB��z_WindowsFlavour.casefoldcCsdd�|D�S)NcSsg|]}|���qSrr^)rM�prrr�
<listcomp>�rPz2_WindowsFlavour.casefold_parts.<locals>.<listcomp>r�r+r9rrr�casefold_parts�r-z_WindowsFlavour.casefold_partscCst�t�|�tj�jSr')�re�compile�fnmatch�	translate�
IGNORECASE�	fullmatch�r+�patternrrr�compile_pattern�sz_WindowsFlavour.compile_patterncCsXd}|�|�r(|dd�}|dd�}|�d�r(||dd�7}d|dd�}||fS)Nr.�zUNC\rRrH)�
startswith)r+raZ
ext_prefixr\rrrrU�s

z$_WindowsFlavour._split_extended_pathcCsJ|sdS|d�d�r
dS|d�d�d�d�d�d�}|��|jvS)NFrz\\rSr/rT� )rq�	partition�rstrip�upper�reserved_names)r+r9�namerrr�is_reserved�s"z_WindowsFlavour.is_reservedcCs`|j}t|�dkr%|ddkr%|��dd��d�}d|t|�d��fSdt|���d��S)NrQrArTrIz
file:///%s/%szutf-8zfile:)�driverW�as_posixrY�urlquote_from_bytes�encode)r+�pathry�restrrr�make_uri�s�z_WindowsFlavour.make_uriN)rDrErFr(r0�has_drv�ntpath�pathmod�osrw�is_supported�setrXZext_namespace_prefixrvr3rBrfrorUrxrrrrrrGps*
���'

rGc@sZeZdZdZdZdZeZej	dkZ
efdd�Zdd�Zd	d
�Z
dd�Zd
d�Zdd�ZdS)�
_PosixFlavourrIr.FrJcCsP|r#|d|kr#|�|�}t|�t|�dkrd|d|fSd||fSdd|fS)NrrQr.)rYrW)r+r=r(Z
stripped_partrrrr3�s


z_PosixFlavour.splitrootcC�|Sr'rr`rrrrB��z_PosixFlavour.casefoldcCr�r'rrerrrrfr�z_PosixFlavour.casefold_partscCst�t�|��jSr')rgrhrirjrlrmrrrro�z_PosixFlavour.compile_patterncCsdS�NFrrerrrrxr�z_PosixFlavour.is_reservedcCst|�}dt|�S)Nzfile://)�bytesr{)r+r}Zbpathrrrr
sz_PosixFlavour.make_uriN)rDrErFr(r0r��	posixpathr�r�rwr�r3rBrfrorxrrrrrr��s
r�c@seZdZdS)�	_AccessorN)rDrErFrrrrr�sr�c@s�eZdZejZejZejZejZej	Z	ej
Z
ejZeed�r"ej
Z
ndd�Z
ejZejZejZeed�r8ejZnddd�Zdd
d�Zeed�rKejZnd
d�Zdd�Zdd�ZejZeejj�Zeejj�ZdS)�_NormalAccessor�linkcC�td��)Nz&os.link() not available on this system��NotImplementedError)r+�src�dstrrrr�-rbz_NormalAccessor.link�symlinkFcCr�)Nz)os.symlink() not available on this systemr�)r+r�r��target_is_directoryrrrr�9rbz_NormalAccessor.symlink�TcCs`|rz	t�|d�WdStyYnwtjtjB}|s"|tjO}t�|||�}t�|�dSr')r��utime�OSError�O_CREAT�O_WRONLY�O_EXCL�open�close)r+r}�mode�exist_ok�flags�fdrrr�touch<s��
z_NormalAccessor.touch�readlinkcCr�)Nz*os.readlink() not available on this systemr��r+r}rrrr�Qrbz_NormalAccessor.readlinkcC�6zddl}|�|�|�j�jWStytd��w)Nrz*Path.owner() is unsupported on this system)�pwd�getpwuid�stat�st_uidZpw_name�ImportErrorr�)r+r}r�rrr�ownerT��z_NormalAccessor.ownercCr�)Nrz*Path.group() is unsupported on this system)�grpZgetgrgidr��st_gidZgr_namer�r�)r+r}r�rrr�group[r�z_NormalAccessor.groupN�F�r�T)rDrErFr�r��ior��listdir�scandir�chmod�mkdir�unlink�hasattrr��rmdir�renamer2r�r�r�r�r��getcwd�staticmethodr}�
expanduser�realpathrrrrr�s4




r�cCsP|d}|dd�}|dkrt}nd|vrtd��t|�r t}nt}||||�S)NrrA�**z:Invalid pattern: '**' can only be an entire path component)�_RecursiveWildcardSelector�
ValueErrorr%�_WildcardSelector�_PreciseSelector)�
pattern_parts�flavourr$�child_parts�clsrrr�_make_selectorpsr��	lru_cachec@seZdZ	dd�Zdd�ZdS)�	_SelectorcCs2||_|rt||�|_d|_dSt�|_d|_dS�NTF)r�r��	successor�dironly�_TerminatingSelector)r+r�r�rrrr,�s

z_Selector.__init__cCs>	t|�}|j}|j}|jj}||�stg�S|�||||�Sr')�type�is_dir�exists�	_accessorr��iter�_select_from)r+�parent_pathZpath_clsr�r�r�rrr�select_from�sz_Selector.select_fromN)rDrErFr,r�rrrrr��s	r�c@seZdZdd�ZdS)r�ccs�|VdSr'r)r+r�r�r�r�rrrr��s�
z!_TerminatingSelector._select_fromN)rDrErFr�rrrrr��sr�c@�eZdZdd�Zdd�ZdS)r�cCs||_t�|||�dSr')rwr�r,)r+rwr�r�rrrr,�sz_PreciseSelector.__init__ccs`�z$|�|j�}|jr
|n||�r |j�||||�D]}|VqWdSWdSty/YdSwr')�_make_child_relpathrwr�r�r��PermissionError)r+r�r�r�r�r}rcrrrr��s���z_PreciseSelector._select_fromN�rDrErFr,r�rrrrr���r�c@r�)r�cCs|�|�|_t�|||�dSr')ro�matchr�r,�r+r$r�r�rrrr,�sz_WildcardSelector.__init__ccs��z_||��}t|�}Wd�n1swY|D]A}|jrAz|��s(WqWnty@}zt|�s6�WYd}~qd}~ww|j}	|�|	�r]|�|	�}
|j�	|
|||�D]}|VqWqWdSt
yjYdSwr')�listr�r�r�r rwr�r�r�r�r�)r+r�r�r�r��
scandir_it�entries�entry�erwr}rcrrrr��s6�

����

���z_WildcardSelector._select_fromNr�rrrrr��r�r�c@s$eZdZdd�Zdd�Zdd�ZdS)r�cCst�|||�dSr')r�r,r�rrrr,�r�z#_RecursiveWildcardSelector.__init__ccs��|VzY||��}t|�}Wd�n1swY|D];}d}z|��}Wnty@}zt|�s6�WYd}~nd}~ww|rZ|��sZ|�|j�}	|�|	||�D]}
|
VqTqWdStygYdSwr�)	r�r�r�r �
is_symlinkr�rw�_iterate_directoriesr�)r+r�r�r�r�r�r�Zentry_is_dirr�r}rcrrrr��s2�

�������z/_RecursiveWildcardSelector._iterate_directoriesc	cs��z5t�}z,|jj}|�|||�D]}|||||�D]}||vr(|V|�|�qqW|��WdS|��wty@YdSwr')r�r�r�r��add�clearr�)	r+r�r�r�r�ZyieldedZsuccessor_selectZstarting_pointrcrrrr��s"�
����z'_RecursiveWildcardSelector._select_fromN)rDrErFr,r�r�rrrrr��sr�c@s2eZdZ	dZdd�Zdd�Zdd�Zdd	�Zd
S)�_PathParents)�_pathcls�_drv�_root�_partscCs&t|�|_|j|_|j|_|j|_dSr')r�r�r�r�r�r�rrrr,s
z_PathParents.__init__cCs$|js|jr
t|j�dSt|j�Sr@)r�r�rWr�r*rrr�__len__s
z_PathParents.__len__cs�t|t�rt�fdd�t|�t����D��S|t��ks$|t��kr(t|��|dkr2|t��7}�j��j	�j
�jd|d��S)Nc3s�|]}�|VqdSr'r)rM�ir*rr�	<genexpr>s�z+_PathParents.__getitem__.<locals>.<genexpr>rrA)�
isinstance�slice�tuple�range�indicesrW�
IndexErrorr��_from_parsed_partsr�r�r�)r+�idxrr*r�__getitem__
s
$�z_PathParents.__getitem__cCsd�|jj�S)Nz<{}.parents>)�formatr�rDr*rrr�__repr__r-z_PathParents.__repr__N)rDrErF�	__slots__r,r�r�r�rrrrr��sr�c@s�eZdZ	dZdd�Zdd�Zedd��Zedd	��Zed
d��Z	edd
��Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zedd��Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zeed,�d-d.�Zeed/�d0d.�Zed1d2��Zed3d4��Zed5d6��Z ed7d8��Z!ed9d:��Z"d;d<�Z#d=d>�Z$d?d@�Z%dAdB�Z&dCdD�Z'edEdF��Z(dGdH�Z)dIdJ�Z*dKdL�Z+edMdN��Z,edOdP��Z-dQdR�Z.dSdT�Z/dUdV�Z0dWS)Xr)r�r�r��_str�_hash�_pparts�_cached_cpartscGs&	|turtjdkrtnt}|�|�S)NrJ)rr�rwrr�_from_parts)r��argsrrr�__new__*s
zPurePath.__new__cCs|jt|j�fSr')�	__class__r�r�r*rrr�
__reduce__4szPurePath.__reduce__cCsbg}|D]&}t|t�r||j7}qt�|�}t|t�r#|�t|��qtdt|���|j	�
|�S)NzNargument should be a str object or an os.PathLike object returning str, not %r)r�rr�r��fspath�strr5�	TypeErrorr��_flavourr?)r�rr9�arrr�_parse_args9s


��zPurePath._parse_argscCs0t�|�}|�|�\}}}||_||_||_|Sr')�objectrr
r�r�r�)r�rr+r:r;r9rrrrMs
zPurePath._from_partscCs t�|�}||_||_||_|Sr')rrr�r�r�)r�r:r;r9r+rrrr�Xs

zPurePath._from_parsed_partscCs0|s|r|||j�|dd��S|j�|�Sr@)rr))r�r:r;r9rrr�_format_parsed_parts`szPurePath._format_parsed_partscCs@|�|�\}}}|j�|j|j|j|||�\}}}|�|||�Sr')r
rrCr�r�r�r�)r+rr:r;r9rrr�_make_childgs

�zPurePath._make_childcCs>	z|jWSty|�|j|j|j�pd|_|jYSw)Nr/)r��AttributeErrorrr�r�r�r*rrr�__str__ms��
�zPurePath.__str__cCst|�Sr')rr*rrr�
__fspath__wrbzPurePath.__fspath__cCs	|j}t|��|jd�S)NrI)rrr2r(�r+�frrrrzzszPurePath.as_posixcCs	t�|�Sr')r��fsencoder*rrr�	__bytes__�s
zPurePath.__bytes__cCsd�|jj|���S)Nz{}({!r}))r�rrDrzr*rrrr��szPurePath.__repr__cCs	|��s	td��|j�|�S)Nz.relative path can't be expressed as a file URI)�is_absoluter�rrr*rrr�as_uri�szPurePath.as_uricCs2z|jWSty|j�|j�|_|jYSwr')r�rrrfr�r*rrr�_cparts�s
�zPurePath._cpartscCs&t|t�stS|j|jko|j|juSr')r�r�NotImplementedrr�r+�otherrrr�__eq__�s
zPurePath.__eq__cCs2z|jWStytt|j��|_|jYSwr')r�r�hashr�rr*rrr�__hash__�s
�zPurePath.__hash__cCs&t|t�r|j|jur
tS|j|jkSr'�r�rrrrrrrr�__lt__��zPurePath.__lt__cCs&t|t�r|j|jur
tS|j|jkSr'rrrrr�__le__�r zPurePath.__le__cCs&t|t�r|j|jur
tS|j|jkSr'rrrrr�__gt__�r zPurePath.__gt__cCs&t|t�r|j|jur
tS|j|jkSr'rrrrr�__ge__�r zPurePath.__ge__cC�|Sr'r)r�r�rrr�__class_getitem__�r�zPurePath.__class_getitem__r�z.The drive prefix (letter or UNC path), if any.)�docr�zThe root of the path, if any.cCs	|j|j}|Sr')r�r�)r+�anchorrrrr'�szPurePath.anchorcCs0	|j}t|�|js
|jrdndkrdS|dS)NrArr.rS)r�rWr�r�rerrrrw�s
z
PurePath.namecCsD	|j}|�d�}d|krt|�dkr ndS||d�SdS)Nr/rrAr.�rw�rfindrW�r+rwr�rrr�suffix�s
�zPurePath.suffixcCs<	|j}|�d�rgS|�d�}dd�|�d�dd�D�S)Nr/cSsg|]}d|�qS)r/r)rMr+rrrrd�rPz%PurePath.suffixes.<locals>.<listcomp>rA)rw�endswithrYr4�r+rwrrr�suffixes�s

zPurePath.suffixescCsD	|j}|�d�}d|krt|�dkr n|S|d|�S|S)Nr/rrAr(r*rrr�stem�s
�z
PurePath.stemcCs�	|jstd|f��|j�|f�\}}}|r-|d|jj|jjfvs-|s-|s-t|�dkr3td|��|�|j|j	|j
dd�|g�S)N�%r has an empty namerSrAzInvalid name %r)rwr�rr?r(r0rWr�r�r�r�)r+rwr:r;r9rrr�	with_name�s���zPurePath.with_namecCs	|�||j�Sr')r1r+)r+r/rrr�	with_stem�szPurePath.with_stemcCs�	|j}|j|vs|jr|j|vrtd|f��|r|�d�r#|dkr)td|��|j}|s5td|f��|j}|s?||}n|dt|��|}|�|j	|j
|jdd�|g�S)NzInvalid suffix %rr/r0rS)rr(r0r�rqrwr+rWr�r�r�r�)r+r+rrwZ
old_suffixrrr�with_suffixs 
�zPurePath.with_suffixc
Gs�	|std��|j}|j}|j}|r||g|dd�}n|}|�|�\}}}|r4||g|dd�}	n|}	t|	�}
|jj}|
dkrG|sF|rfn||d|
��||	�krf|�|||�}t	d�
t|�t|����|�d|
dkro|nd||
d��S)Nzneed at least one argumentrArzU{!r} is not in the subpath of {!r} OR one path is relative and the other is absolute.r.)
rr�r�r�r
rWrrfrr�r�rr�)
r+rr9r:r;Z	abs_partsZto_drvZto_rootZto_partsZto_abs_parts�n�cfZ	formattedrrr�relative_tos2��
�zPurePath.relative_tocGs(	z|j|�WdStyYdSwr�)r6r�rrrr�is_relative_to8s
�zPurePath.is_relative_tocCs0	z|jWStyt|j�|_|jYSwr')r�rr�r�r*rrrr9As
�zPurePath.partscGs	|�|�Sr')r
)r+rrrr�joinpathMs
zPurePath.joinpathcCs&z|�|f�WStytYSwr')r
rr�r+�keyrrr�__truediv__Us
�zPurePath.__truediv__cCs,z
|�|g|j�WStytYSwr')rr�rrr9rrr�__rtruediv__[s
�zPurePath.__rtruediv__cCsB	|j}|j}|j}t|�dkr|s|r|S|�|||dd��S)NrArS)r�r�r�rWr�)r+r:r;r9rrr�parentaszPurePath.parentcCs
	t|�Sr')r�r*rrr�parentskszPurePath.parentscCs 	|jsdS|jjpt|j�Sr�)r�rr��boolr�r*rrrrpszPurePath.is_absolutecCs	|j�|j�Sr')rrxr�r*rrrrxwszPurePath.is_reservedc	Cs�	|jj}||�}|j�|f�\}}}|std��|r$|||j�kr$dS|r/|||j�kr/dS|j}|s6|rGt|�t|�kr@dS|dd�}n
t|�t|�krQdStt	|�t	|��D]
\}}t
�||�sgdSqZdS)Nz
empty patternFrAT)rrBr?r�r�r�rrW�zipr1riZfnmatchcase)	r+Zpath_patternr5r:r;Z	pat_partsr9r=r$rrrr�|s,�zPurePath.matchN)1rDrErFr�rr�classmethodr
rr�rr
rrrzrr�r�propertyrrrrr!r"r#r%rryr;r'rwr+r.r/r1r2r3r6r7r9r8r;r<r=r>rrxr�rrrrrs|







��




	!	

	
rc@�eZdZ	eZdZdS)rrN)rDrErF�_posix_flavourrr�rrrrr��rc@rC)rrN)rDrErF�_windows_flavourrr�rrrrr�rErc@s�eZdZ	eZdZdd�Zdd�Zdd�Zdd	�Z	e
d
d��Ze
dd
��Zdd�Z
dd�Zdd�Zdd�Zdd�Zd`dd�Zdd�dd�Zdd �Zd!d"�Z	%	%dad&d'�Zd(d)�Zdbd*d+�Zd,d-�Zdcd.d/�Zd0d1�Zddd3d4�Zded6d7�Zdd�d8d9�Zd:d;�Zd`d<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$d`dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d%S)frrcOs@|tur
tjdkrtnt}|�|�}|jjstd|j	f��|S)NrJz$cannot instantiate %r on your system)
rr�rwrrrrr�r�rD)r�r�kwargsr+rrrr�s
�zPath.__new__cCs|j|g}|�|j|j|�Sr')r�r�r�r�)r+r=r9rrrr��szPath._make_child_relpathcCr$r'rr*rrr�	__enter__�r�zPath.__enter__cCsdSr'r)r+�t�v�tbrrr�__exit__�s	z
Path.__exit__cCs	||j���Sr')r�r��r�rrr�cwd�szPath.cwdcCs	|d���S)N�~)r�rMrrr�home�sz	Path.homecCsD	|��}z|��}Wnty|j�|�}Ynwtj�||�Sr')r�rr�r�r}�samestat)r+Z
other_path�stZother_strrr�samefile�s�z
Path.samefileccs0�	|j�|�D]
}|dvrq|�|�VqdS)N>r/z..)r�r�r�r-rrr�iterdir�s��zPath.iterdirccsr�	t�d||�|std�|���|j�|f�\}}}|s |r$td��tt|�|j�}|�	|�D]}|Vq1dS)Nzpathlib.Path.globzUnacceptable pattern: {!r}�%Non-relative patterns are unsupported)
r6�auditr�r�rr?r�r�r�r��r+rnr:r;r�Zselectorrcrrr�glob�s��z	Path.globccsd�	t�d||�|j�|f�\}}}|s|rtd��tdt|�|j�}|�|�D]}|Vq*dS)Nzpathlib.Path.rglobrU)r�)r6rVrr?r�r�r�r�rWrrr�rglob
s��z
Path.rglobcCs&	|��r|S|�|j��g|j�Sr')rrr�r�r�r*rrr�absolutesz
Path.absoluteFc
Cs�	dd�}z
|jj||d�}Wnty }z||��d}~ww|�|f�}|sHz|��W|StyG}z||�WYd}~|Sd}~ww|S)NcSs0t|dd�}|jtks|tkrtd|j��dS)NrrzSymlink loop from %r)rrr�_WINERROR_CANT_RESOLVE_FILENAME�RuntimeError�filename)r�rrrr�check_eloop/s�z!Path.resolve.<locals>.check_eloop)�strict)r�r�r�rr�)r+r_r^rar�rcrrr�resolve(s(��
���zPath.resolveT��follow_symlinkscCs	|jj||d�S�Nra)r�r�)r+rbrrrr�Dsz	Path.statcC�	|j�|�Sr')r�r�r*rrrr�K�z
Path.ownercCrdr')r�r�r*rrrr�Qrez
Path.group�rrSNcCs*	d|vr
t�|�}|j�||||||�S)N�b)r��
text_encodingr�r�)r+r��	buffering�encoding�errors�newlinerrrr�Ws
�z	Path.opencCs:	|jdd��}|��Wd�S1swYdS)N�rb�r�)r��readrrrr�
read_bytesbs$�zPath.read_bytescCsH	t�|�}|jd||d��}|��Wd�S1swYdS)Nrf)r�rjrk)r�rhr�ro)r+rjrkrrrr�	read_textis

$�zPath.read_textcCsD	t|�}|jdd��
}|�|�Wd�S1swYdS)N�wbrn)�
memoryviewr��write)r+�dataZviewrrrr�write_bytesqs
$�zPath.write_bytescCsf	t|t�std|jj��t�|�}|jd|||d��
}|�|�Wd�S1s,wYdS)Nzdata must be str, not %s�w)r�rjrkrl)	r�rrrrDr�rhr�rt)r+rurjrkrlrrrr�
write_textzs
�
$�zPath.write_textcCs	|j�|�}|�|f�Sr')r�r�rr�rrrr��sz
Path.readlinkr�cCs	|j�|||�dSr')r�r�)r+r�r�rrrr��sz
Path.touch�cCs|	z
|j�||�WdSty-|r|j|kr�|jjddd�|j|d|d�YdSty=|r9|��s:�YdSw)NT)r>r�F)r�r��FileNotFoundErrorr=r�r�)r+r�r>r�rrrr��s��z
Path.mkdircCs	|jj|||d�dSrc)r�r�)r+r�rbrrrr��sz
Path.chmodcCs	|j|dd�dS�NFra)r�)r+r�rrr�lchmod�szPath.lchmodcCs0	z	|j�|�WdSty|s�YdSwr')r�r�rz)r+Z
missing_okrrrr��s��zPath.unlinkcCs	|j�|�dSr')r�r�r*rrrr��sz
Path.rmdircCs	|jdd�Sr{)r�r*rrr�lstat�sz
Path.lstatcC�	|j�||�|�|�Sr')r�r�r�r+�targetrrrr���	
zPath.renamecCr~r')r�r2rrrrrr2�r�zPath.replacecCs	|j�|||�dSr')r�r�)r+r�r�rrr�
symlink_to�szPath.symlink_tocCs	|j�||�dSr')r�r�rrrr�hardlink_to�szPath.hardlink_tocCs$	tjdtdd�|j�||�dS)Nzypathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.rQ)�
stacklevel)�warnings�warn�DeprecationWarningr�r�rrrr�link_to�s
�zPath.link_toc
CsT	z|��WdSty }zt|�s�WYd}~dSd}~wty)YdSw�NFT)r�r�r r��r+r�rrrr�s
���zPath.existsc
C�V	zt|��j�WSty!}zt|�s�WYd}~dSd}~wty*YdSwr�)r	r��st_moder�r r�r�rrrr����zPath.is_dirc
Cr�r�)rr�r�r�r r�r�rrr�is_file$s��zPath.is_filecCsp	|��r	|��sdSz|j��j}Wn
tyYdSw|��j}||kr)dS|��j}|j��j}||kSr�)r�r�r=r��st_devr��st_ino)r+Z
parent_devZdevZinoZ
parent_inorrr�is_mount5s�

z
Path.is_mountc
Cr�r�)r
r}r�r�r r�r�rrrr�Is��zPath.is_symlinkc
Cr�r�)r
r�r�r�r r�r�rrr�is_block_deviceXr�zPath.is_block_devicec
Cr�r�)rr�r�r�r r�r�rrr�is_char_devicehr�zPath.is_char_devicec
Cr�r�)rr�r�r�r r�r�rrr�is_fifoxr�zPath.is_fifoc
Cr�r�)rr�r�r�r r�r�rrr�	is_socket�r�zPath.is_socketcCsr	|js7|js7|jr7|jddd�dkr7|j�|jd�}|dd�dkr*td��|�|g|jdd��S|S)NrrArOz#Could not determine home directory.)r�r�r�r�r�r\r)r+Zhomedirrrrr��s�zPath.expanduserr�)rfrSNNN)NN)NNNr�)ryFF)2rDrErF�_normal_accessorr�r�rr�rHrLrArNrPrSrTrXrYrZr`r�r�r�r�rprqrvrxr�r�r�r�r|r�r�r}r�r2r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�sf	




�

	




rc@seZdZ	dZdS)rrN)rDrErFr�rrrrr�src@seZdZ	dZdd�ZdS)rrcCr�)Nz-Path.is_mount() is unsupported on this systemr�r*rrrr��rbzWindowsPath.is_mountN)rDrErFr�r�rrrrr�sr)@ri�	functoolsr�r�r�r�rgr6r��_collections_abcrrrrrrr�operatorrr�r	r
rrr
rrZurllib.parserr{�__all__Z_WINERROR_NOT_READYZ_WINERROR_INVALID_NAMEr[rrr r%rr&rGr�rFrDr�r�r�r�r�r�r�r�r�r�r�r�r�PathLike�registerrrrrrrrrr�<module>sl$	�?w*O

,!}

x