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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/lib64/python3.6/__pycache__
Viewing File: /usr/lib64/python3.6/__pycache__/pathlib.cpython-36.opt-1.pyc
3 ai���@s$ddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z mZmZmZddlmZddlmZmZmZmZmZmZmZddlmZdZd d d d d dgZdZ dZ!dZ"dd�Z#Gdd�de$�Z%Gdd�de%�Z&Gdd�de%�Z'e&�Z(e'�Z)Gdd�d�Z*Gdd�de*�Z+e+�Z,dd�Z-e.ed ��rTej/�e-�Z-Gd!d"�d"�Z0Gd#d$�d$�Z1Gd%d&�d&e0�Z2Gd'd(�d(e0�Z3Gd)d*�d*e0�Z4Gd+d,�d,e �Z5Gd-d �d e$�Z6ej7j8e6�Gd.d �d e6�Z9Gd/d �d e6�Z:Gd0d �d e6�Z;Gd1d �d e;e9�Z<Gd2d�de;e:�Z=dS)3�N)�Sequence)�contextmanager)�EINVAL�ENOENT�ENOTDIR�ELOOP)� attrgetter)�S_ISDIR�S_ISLNK�S_ISREG�S_ISSOCK�S_ISBLK�S_ISCHR�S_ISFIFO)�quote_from_bytesT�PurePath� PurePosixPath�PureWindowsPath�Path� PosixPath� WindowsPath��{i�cCsd|kpd|kpd|kS)N�*�?�[�)�patrr�/usr/lib64/python3.6/pathlib.py�_is_wildcard_pattern!src@s(eZdZdZdd�Zdd�Zdd�ZdS) �_FlavourzPA flavour implements a particular (platform-specific) set of path semantics.cCs|jj|_dS)N)�sep�join)�selfrrr�__init__+sz_Flavour.__init__c Cs g}|j}|j}d}}t|�}x�|D]�}|s0q&|r@|j||�}|j|�\}}} || kr�xPt| j|��D] } | rh| dkrh|jtj| ��qhWn| r�| dkr�|jtj| ��|s�|r&|s�x6|D].}|s�q�|r�|j||�}|j|�d}|r�Pq�WPq&W|�s|�r|j||�|j �|||fS)N��.r) r!�altsep�reversed�replace� splitroot�split�append�sys�intern�reverse) r#�partsZparsedr!r'�drv�root�it�partZrel�xrrr� parse_parts.s@       z_Flavour.parse_partscCs||r,| rr|rr||||g|dd�fSnF|rd||ksL|j|�|j|�krr||||dd�fSn||||fS|||fS)z� Join the two paths represented by the respective (drive, root, parts) tuples. Return a new (drive, root, parts) tuple. �N)�casefold)r#r1r2r0Zdrv2Zroot2Zparts2rrr�join_parsed_partsTs z_Flavour.join_parsed_partsN)�__name__� __module__� __qualname__�__doc__r$r6r9rrrrr 's&r c@s�eZdZdZdZdZeZej dkZ e dd�e e d�e d�d �D��e d d�e e d �e d �d �D��BZd Zddddhdd�e d d�D�Bdd�e d d�D�BZefdd�Zdd�Zdd�Zefdd�Zdd�Zd d!�Zd"d#�Zd$S)%�_WindowsFlavour�\�/T�ntccs|]}t|�VqdS)N)�chr)�.0r5rrr� <genexpr>rsz_WindowsFlavour.<genexpr>�a�zr7ccs|]}t|�VqdS)N)rB)rCr5rrrrDss�A�Zz\\?\ZCONZPRNZAUXZNULcCsh|] }d|�qS)zCOM%dr)rC�irrr� <setcomp>ysz_WindowsFlavour.<setcomp>� cCsh|] }d|�qS)zLPT%dr)rCrIrrrrJzsc Csb|dd�}|dd�}||krP||krP|j|�\}}|dd�}|dd�}nd}|dd�}||kov||kov||k�r|j|d�}|dk�r|j||d�}||dk�r|dkr�t|�}|r�||d|�|||dd�fS|d|�|||dd�fSd} } |dk�r<||jk�r<|dd�} |dd�}|}||k�rT|} |j|�}|| | |fS) Nrr7�r%��:���rO)�_split_extended_path�find�len� drive_letters�lstrip) r#r4r!�first�second�prefixZthird�indexZindex2r1r2rrrr*�s6      "    z_WindowsFlavour.splitrootcCs|j�S)N)�lower)r#�srrrr8�sz_WindowsFlavour.casefoldcCsdd�|D�S)NcSsg|] }|j��qSr)rY)rC�prrr� <listcomp>�sz2_WindowsFlavour.casefold_parts.<locals>.<listcomp>r)r#r0rrr�casefold_parts�sz_WindowsFlavour.casefold_partscCsXd}|j|�rP|dd�}|dd�}|jd�rP||dd�7}d|dd�}||fS)Nr%�zUNC\rMr?)� startswith)r#rZZ ext_prefixrWrrrrP�s    z$_WindowsFlavour._split_extended_pathcCs6|sdS|djd�rdS|djd�dj�|jkS)NFrz\\r7r&rO)r_� partition�upper�reserved_names)r#r0rrr� is_reserved�s z_WindowsFlavour.is_reservedcCsd|j}t|�dkrJ|ddkrJ|j�dd�jd�}d|t|jd��fSdt|j�jd��SdS)NrLr7rNr@z file:///%s/%szutf-8zfile:)�driverR�as_posixrT�urlquote_from_bytes�encode)r#�pathrd�restrrr�make_uri�s z_WindowsFlavour.make_uric Cs�dtjkrtjd}n`dtjkr,tjd}nJdtjkrnytjd}Wntk r\d}YnX|tjd}ntd��|r�tjd|kr�|j|f�\}}}|d tjdkr�td |��||d <|s�|r�|||j|dd��}n |j|�}|S) N�HOMEZ USERPROFILEZHOMEPATHZ HOMEDRIVEr%zCan't determine home directoryZUSERNAMEr7z%Can't determine home directory for %rrOrO)�os�environ�KeyError� RuntimeErrorr6r")r#�username�userhomer1r2r0rrr� gethomedir�s,       z_WindowsFlavour.gethomedirN)r:r;r<r!r'�has_drv�ntpath�pathmodrl�name� is_supported�set�range�ordrSZext_namespace_prefixrbr*r8r]rPrcrjrrrrrrr>fs" "& '   r>c@sZeZdZdZdZdZeZej dkZ efdd�Z dd�Z d d �Z d d �Zd d�Zdd�ZdS)� _PosixFlavourr@r%FrAcCsV|rH|d|krH|j|�}t|�t|�dkr<d|d|fSd||fSn dd|fSdS)NrrLr%)rTrR)r#r4r!Z stripped_partrrrr*�s   z_PosixFlavour.splitrootcCs|S)Nr)r#rZrrrr8sz_PosixFlavour.casefoldcCs|S)Nr)r#r0rrrr] sz_PosixFlavour.casefold_partscCsdS)NFr)r#r0rrrrcsz_PosixFlavour.is_reservedcCst|�}dt|�S)Nzfile://)�bytesrf)r#rhZbpathrrrrjsz_PosixFlavour.make_uric Cst|s:y tjdStk r6ddl}|jtj��jSXn6ddl}y |j|�jStk rntd|��YnXdS)Nrkrz%Can't determine home directory for %r) rlrmrn�pwd�getpwuid�getuid�pw_dir�getpwnamro)r#rpr}rrrrrs  z_PosixFlavour.gethomedirN)r:r;r<r!r'rs� posixpathrurlrvrwr*r8r]rcrjrrrrrrr{�s  r{c@seZdZdZdS)� _AccessorzjAn accessor implements a particular (system-specific or not) way of accessing paths on the filesystem.N)r:r;r<r=rrrrr�+sr�c@s�eZdZdd�Zdd�Zeej�Zeej�Zeej�Zeej �Z eej �Z eej �Z e ed�rjeej �Z ndd�Z eej�Zeej�Zeej�Zeej�Zeej�Ze ed�r�ejZn dd d �Zeej�Zd d �ZejZeejj�Zeejj�ZdS)�_NormalAccessorcstj���fdd��}t|�S)Ncs�t|�f|��S)N)�str)�pathobj�args)�strfuncrr�wrapped3sz._NormalAccessor._wrap_strfunc.<locals>.wrapped)� functools�wraps� staticmethod)r�r�r)r�r� _wrap_strfunc2sz_NormalAccessor._wrap_strfunccstj���fdd��}t|�S)Ncs�t|�t|�f|��S)N)r�)ZpathobjAZpathobjBr�)r�rrr�9sz5_NormalAccessor._wrap_binary_strfunc.<locals>.wrapped)r�r�r�)r�r�r)r�r�_wrap_binary_strfunc8sz$_NormalAccessor._wrap_binary_strfunc�lchmodcCs td��dS)Nz%lchmod() not available on this system)�NotImplementedError)r#r��moderrrr�Msz_NormalAccessor.lchmod�symlinkFcCs td��dS)Nz)os.symlink() not available on this system)r�)r#�src�dst�target_is_directoryrrrr�]sz_NormalAccessor.symlinkcCs tj|�S)N)rl�readlink)r#rhrrrr�csz_NormalAccessor.readlinkN)F)r:r;r<r�r�rl�stat�lstat�open�listdir�scandir�chmod�hasattrr��mkdir�unlink�rmdir�renamer)r��utimer��getcwdr�rh� expanduser�realpathrrrrr�0s0                 r�cCsP|d}|dd�}|dkr"t}n$d|kr4td��nt|�rBt}nt}|||�S)Nrr7z**z:Invalid pattern: '**' can only be an entire path component)�_RecursiveWildcardSelector� ValueErrorr�_WildcardSelector�_PreciseSelector)� pattern_partsr� child_parts�clsrrr�_make_selectorts  r�� lru_cachec@s eZdZdZdd�Zdd�ZdS)� _SelectorzYA selector matches a specific glob pattern part against the children of a given path.cCs.||_|rt|�|_d|_nt�|_d|_dS)NTF)r�r�� successor�dironly�_TerminatingSelector)r#r�rrrr$�s  z_Selector.__init__cCs<t|�}|j}|j}|jj}||�s,tg�S|j||||�S)zuIterate over all child paths of `parent_path` matched by this selector. This can contain parent_path itself.)�type�is_dir�exists� _accessorr��iter� _select_from)r#� parent_pathZpath_clsr�r�r�rrr� select_from�sz_Selector.select_fromN)r:r;r<r=r$r�rrrrr��s r�c@seZdZdd�ZdS)r�ccs |VdS)Nr)r#r�r�r�r�rrrr��sz!_TerminatingSelector._select_fromN)r:r;r<r�rrrrr��sr�c@seZdZdd�Zdd�ZdS)r�cCs||_tj||�dS)N)rvr�r$)r#rvr�rrrr$�sz_PreciseSelector.__init__c cs^yD|j|j�}|jr|n||�rBx |jj||||�D] }|Vq4WWntk rXdSXdS)N)�_make_child_relpathrvr�r�r��PermissionError)r#r�r�r�r�rhr[rrrr��s z_PreciseSelector._select_fromN)r:r;r<r$r�rrrrr��sr�c@seZdZdd�Zdd�ZdS)r�cCs"tjtj|��|_tj||�dS)N)�re�compile�fnmatch� translaterr�r$)r#rr�rrrr$�sz_WildcardSelector.__init__c cs�y||jj}t||��}xb|D]Z}|j s0|j�r|j}||�} |jj| �r|j|�} x |j j | |||�D] } | VqhWqWWnt k r�dSXdS)N) �_flavourr8�listr�r�rvr�matchr�r�r�r�) r#r�r�r�r��cf�entries�entryrvZ casefoldedrhr[rrrr��s    z_WildcardSelector._select_fromN)r:r;r<r$r�rrrrr��sr�c@s$eZdZdd�Zdd�Zdd�ZdS)r�cCstj||�dS)N)r�r$)r#rr�rrrr$�sz#_RecursiveWildcardSelector.__init__c csz|VyZt||��}xH|D]@}|j�r|j� r|j|j�}x|j|||�D] }|VqLWqWWntk rtdSXdS)N)r�r�� is_symlinkr�rv�_iterate_directoriesr�)r#r�r�r�r�r�rhr[rrrr��s   z/_RecursiveWildcardSelector._iterate_directoriesc cs�yjt�}zT|jj}xF|j|||�D]4}x.|||||�D]}||kr6|V|j|�q6Wq"WWd|j�XWntk r~dSXdS)N)rxr�r�r��add�clearr�) r#r�r�r�r�ZyieldedZsuccessor_selectZstarting_pointr[rrrr��sz'_RecursiveWildcardSelector._select_fromN)r:r;r<r$r�r�rrrrr��s r�c@s4eZdZdZdZdd�Zdd �Zd d �Zd d �ZdS)� _PathParentszvThis object provides sequence-like access to the logical ancestors of a path. Don't try to construct it yourself.�_pathcls�_drv�_root�_partscCs&t|�|_|j|_|j|_|j|_dS)N)r�r�r�r�r�)r#rhrrrr$�s z_PathParents.__init__cCs(|js |jrt|j�dSt|j�SdS)Nr7)r�r�rRr�)r#rrr�__len__�s z_PathParents.__len__cCs@|dks|t|�krt|��|jj|j|j|jd| d��S)Nrr7)rR� IndexErrorr��_from_parsed_partsr�r�r�)r#�idxrrr� __getitem__sz_PathParents.__getitem__cCsdj|jj�S)Nz <{}.parents>)�formatr�r:)r#rrr�__repr__sz_PathParents.__repr__N)r�r�r�r�) r:r;r<r=� __slots__r$r�r�r�rrrrr��s r�c@s�eZdZdZdZZd d �Zd d �Zed d��Zed[dd��Z ed\dd��Z edd��Z dd�Z dd�Z dd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zed&d'��Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zeed�d4d5�Zeed�d6d5�Zed7d8��Zed9d:��Z ed;d<��Z!ed=d>��Z"ed?d@��Z#dAdB�Z$dCdD�Z%dEdF�Z&edGdH��Z'dIdJ�Z(dKdL�Z)dMdN�Z*edOdP��Z+edQdR��Z,dSdT�Z-dUdV�Z.dWdX�Z/dYS)]ra|Base class for manipulating paths without I/O. PurePath represents a filesystem path and offers operations which don't imply any actual filesystem I/O. Depending on your system, instantiating a PurePath will return either a PurePosixPath or a PureWindowsPath object. You can also instantiate either of these classes directly, regardless of your system. r�r�r��_str�_hash�_pparts�_cached_cpartscGs$|tkrtjdkrtnt}|j|�S)z�Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object. rA)rrlrvrr� _from_parts)r�r�rrr�__new__szPurePath.__new__cCs|jt|j�fS)N)� __class__�tupler�)r#rrr� __reduce__$szPurePath.__reduce__cCshg}xV|D]N}t|t�r$||j7}q tj|�}t|t�rH|jt|��q tdt|���q W|j j |�S)NzNargument should be a str object or an os.PathLike object returning str, not %r) � isinstancerr�rl�fspathr�r,� TypeErrorr�r�r6)r�r�r0rErrr� _parse_args)s     zPurePath._parse_argsTcCs<tj|�}|j|�\}}}||_||_||_|r8|j�|S)N)�objectr�r�r�r�r��_init)r�r��initr#r1r2r0rrrr�=s zPurePath._from_partscCs,tj|�}||_||_||_|r(|j�|S)N)r�r�r�r�r�r�)r�r1r2r0r�r#rrrr�Js zPurePath._from_parsed_partscCs4|s|r$|||jj|dd��S|jj|�SdS)Nr7)r�r")r�r1r2r0rrr�_format_parsed_partsTszPurePath._format_parsed_partscCsdS)Nr)r#rrrr�[szPurePath._initcCs@|j|�\}}}|jj|j|j|j|||�\}}}|j|||�S)N)r�r�r9r�r�r�r�)r#r�r1r2r0rrr� _make_child_szPurePath._make_childc Cs<y|jStk r6|j|j|j|j�p,d|_|jSXdS)z[Return the string representation of the path, suitable for passing to system calls.r&N)r��AttributeErrorr�r�r�r�)r#rrr�__str__es  zPurePath.__str__cCst|�S)N)r�)r#rrr� __fspath__oszPurePath.__fspath__cCs|j}t|�j|jd�S)zNReturn the string representation of the path with forward (/) slashes.r@)r�r�r)r!)r#�frrrrerszPurePath.as_posixcCstjt|��S)zaReturn the bytes representation of the path. This is only recommended to use under Unix.)rl�fsencoder�)r#rrr� __bytes__xszPurePath.__bytes__cCsdj|jj|j��S)Nz{}({!r}))r�r�r:re)r#rrrr�}szPurePath.__repr__cCs|j�std��|jj|�S)z Return the path as a 'file' URI.z.relative path can't be expressed as a file URI)� is_absoluter�r�rj)r#rrr�as_uri�szPurePath.as_uric Cs2y|jStk r,|jj|j�|_|jSXdS)N)r�r�r�r]r�)r#rrr�_cparts�s zPurePath._cpartscCs&t|t�stS|j|jko$|j|jkS)N)r�r�NotImplementedr�r�)r#�otherrrr�__eq__�s zPurePath.__eq__c Cs2y|jStk r,tt|j��|_|jSXdS)N)r�r��hashr�r�)r#rrr�__hash__�s zPurePath.__hash__cCs(t|t� s|j|jk rtS|j|jkS)N)r�rr�r�r�)r#r�rrr�__lt__�szPurePath.__lt__cCs(t|t� s|j|jk rtS|j|jkS)N)r�rr�r�r�)r#r�rrr�__le__�szPurePath.__le__cCs(t|t� s|j|jk rtS|j|jkS)N)r�rr�r�r�)r#r�rrr�__gt__�szPurePath.__gt__cCs(t|t� s|j|jk rtS|j|jkS)N)r�rr�r�r�)r#r�rrr�__ge__�szPurePath.__ge__z.The drive prefix (letter or UNC path), if any.)�doczThe root of the path, if any.cCs|j|j}|S)z/The concatenation of the drive and root, or ''.)r�r�)r#�anchorrrrr��s zPurePath.anchorcCs.|j}t|�|js|jrdndkr&dS|dS)z!The final path component, if any.r7rr%rO)r�rRr�r�)r#r0rrrrv�sz PurePath.namecCsD|j}|jd�}d|ko*t|�dknr<||d�SdSdS)z*The final component's last suffix, if any.r&rr7Nr%)rv�rfindrR)r#rvrIrrr�suffix�s    zPurePath.suffixcCs:|j}|jd�rgS|jd�}dd�|jd�dd�D�S)z1A list of the final component's suffixes, if any.r&cSsg|] }d|�qS)r&r)rCr�rrrr\�sz%PurePath.suffixes.<locals>.<listcomp>r7N)rv�endswithrTr+)r#rvrrr�suffixes�s   zPurePath.suffixescCsD|j}|jd�}d|ko*t|�dknr<|d|�S|SdS)z0The final path component, minus its last suffix.r&rr7N)rvr�rR)r#rvrIrrr�stem�s    z PurePath.stemcCs�|jstd|f��|jj|f�\}}}| sZ|d|jj|jjgksZ|sZ|sZt|�dkrftd|��|j|j|j |j dd�|g�S)z-Return a new path with the file name changed.z%r has an empty namer7zInvalid name %rNrOrO) rvr�r�r6r!r'rRr�r�r�r�)r#rvr1r2r0rrr� with_name�s  zPurePath.with_namecCs�|j}|j|ks |jr,|j|kr,td|��|r<|jd� sD|dkrPtd|��|j}|shtd|f��|j}|s|||}n|dt|� �|}|j|j |j |j dd�|g�S)z�Return a new path with the file suffix changed. If the path has no suffix, add given suffix. If the given suffix is an empty string, remove the suffix from the path. zInvalid suffix %rr&z%r has an empty nameNr7rO) r�r!r'r�r_rvr�rRr�r�r�r�)r#r�r�rvZ old_suffixrrr� with_suffix�s    zPurePath.with_suffixc Gs�|s td��|j}|j}|j}|r8||g|dd�}n|}|j|�\}}}|rf||g|dd�} n|} t| �} |jj} | dkr�|p�|n| |d| ��| | �kr�|j|||�} t dj t |�t | ����|j d| dkr�|nd|| d��S)z�Return the relative path to another path identified by the passed arguments. If the operation is not possible (because this is not a subpath of the other path), raise ValueError. zneed at least one argumentr7Nrz{!r} does not start with {!r}r%) r�r�r�r�r�rRr�r]r�r�r�r�r�) r#r�r0r1r2Z abs_partsZto_drvZto_rootZto_partsZ to_abs_parts�nr�Z formattedrrr� relative_tos( (zPurePath.relative_toc Cs.y|jStk r(t|j�|_|jSXdS)zZAn object providing sequence-like access to the components in the filesystem path.N)r�r�r�r�)r#rrrr0 s  zPurePath.partscGs |j|�S)z�Combine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored). )r�)r#r�rrr�joinpath,szPurePath.joinpathcCs |j|f�S)N)r�)r#�keyrrr� __truediv__4szPurePath.__truediv__cCs|j|g|j�S)N)r�r�)r#rrrr� __rtruediv__7szPurePath.__rtruediv__cCs@|j}|j}|j}t|�dkr*|s&|r*|S|j|||dd��S)zThe logical parent of the path.r7NrO)r�r�r�rRr�)r#r1r2r0rrr�parent:s zPurePath.parentcCst|�S)z*A sequence of this path's logical parents.)r�)r#rrr�parentsDszPurePath.parentscCs|js dS|jj pt|j�S)zSTrue if the path is absolute (has both a root and, if applicable, a drive).F)r�r�rs�boolr�)r#rrrr�IszPurePath.is_absolutecCs|jj|j�S)zaReturn True if the path contains one of the special names reserved by the system, if any.)r�rcr�)r#rrrrcPszPurePath.is_reservedc Cs�|jj}||�}|jj|f�\}}}|s0td��|rF|||j�krFdS|r\|||j�kr\dS|j}|sj|r�t|�t|�kr~dS|dd�}nt|�t|�kr�dSx.tt |�t |��D]\}}t j ||�s�dSq�WdS)zE Return True if this path matches the given pattern. z empty patternFr7NT) r�r8r6r�r�r�r�rR�zipr(r�Z fnmatchcase) r#Z path_patternr�r1r2Z pat_partsr0r4rrrrr�Us( zPurePath.matchN)r�r�r�r�r�r�r�)T)T)0r:r;r<r=r�r�r�� classmethodr�r�r�r�r�r�r�r�rer�r�r��propertyr�r�r�r�r�r�r�rrdr2r�rvr�rrrrrr0rr r r r r�rcr�rrrrr s^            c@seZdZdZeZfZdS)rz�PurePath subclass for non-Windows systems. On a POSIX system, instantiating a PurePath should return this object. However, you can also instantiate it directly on any system. N)r:r;r<r=�_posix_flavourr�r�rrrrrssc@seZdZdZeZfZdS)rz�PurePath subclass for Windows systems. On a Windows system, instantiating a PurePath should return this object. However, you can also instantiate it directly on any system. N)r:r;r<r=�_windows_flavourr�r�rrrrr}sc@s�eZdZdZdaZdd�Zdbdd�Zd d �Zd d �Zd d�Z dd�Z dcdd�Z dddd�Z e dd��Ze dd��Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zded&d'�Zd(d)�Zd*d+�Zd,d-�Zdgd0d1�Zd2d3�Zdhd4d5�Zd6d7�Zdid8d9�Zdjd;d<�Zdkd=d>�Zd?d@�Z dAdB�Z!dCdD�Z"dEdF�Z#dGdH�Z$dIdJ�Z%dKdL�Z&dldMdN�Z'dOdP�Z(dQdR�Z)dSdT�Z*dUdV�Z+dWdX�Z,dYdZ�Z-d[d\�Z.d]d^�Z/d_d`�Z0dS)mra�PurePath subclass that can make system calls. Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa. r��_closedcOsL|tkrtjdkrtnt}|j|dd�}|jjs@td|j f��|j �|S)NrAF)r�z$cannot instantiate %r on your system) rrlrvrrr�r�rwr�r:r�)r�r��kwargsr#rrrr��s z Path.__new__NcCs"d|_|dk r|j|_nt|_dS)NF)rr��_normal_accessor)r#�templaterrrr��s z Path._initcCs|j|g}|j|j|j|�S)N)r�r�r�r�)r#r4r0rrrr��s zPath._make_child_relpathcCs|jr|j�|S)N)r� _raise_closed)r#rrr� __enter__�szPath.__enter__cCs d|_dS)NT)r)r#�t�v�tbrrr�__exit__�sz Path.__exit__cCs td��dS)NzI/O operation on closed path)r�)r#rrrr�szPath._raise_closed�cCs|jj|||�S)N)r�r�)r#rv�flagsr�rrr�_opener�sz Path._opener�cCs|jr|j�|jj|||�S)zm Open the file pointed by this path and return a file descriptor, as os.open() does. )rrr�r�)r#rr�rrr� _raw_open�szPath._raw_opencCs |tj��S)zjReturn a new path pointing to the current working directory (as returned by os.getcwd()). )rlr�)r�rrr�cwd�szPath.cwdcCs||�jjd��S)zrReturn a new path pointing to the user's home directory (as returned by os.path.expanduser('~')). N)r�rr)r�rrr�home�sz Path.homec CsB|j�}y |j�}Wntk r2tj|�}YnXtjj||�S)zoReturn whether other_path is the same or not as this file (as returned by os.path.samefile()). )r�r�rlrh�samestat)r#Z other_path�stZother_strrr�samefile�s  z Path.samefileccsL|jr|j�x8|jj|�D](}|dkr*q|j|�V|jr|j�qWdS)zyIterate over the files in this directory. Does not yield any result for the special paths '.' and '..'. r&�..N>r'r&)rrr�r�r�)r#rvrrr�iterdir�s z Path.iterdirccsl|stdj|���|jj|�}|jj|f�\}}}|s:|rBtd��tt|��}x|j|�D] }|VqZWdS)z�Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given pattern. zUnacceptable pattern: {!r}z%Non-relative patterns are unsupportedN) r�r�r�r8r6r�r�r�r�)r#�patternr1r2r��selectorr[rrr�glob�s  z Path.globccs^|jj|�}|jj|f�\}}}|s(|r0td��tdt|��}x|j|�D] }|VqLWdS)z�Recursively yield all existing files (of any kind, including directories) matching the given pattern, anywhere in this subtree. z%Non-relative patterns are unsupported�**N)r,)r�r8r6r�r�r�r�)r#r)r1r2r�r*r[rrr�rglobs z Path.rglobcCsD|jr|j�|j�r|S|jtj�g|jdd�}|j|d�|S)aReturn an absolute version of this path. This function works even if the path doesn't point to anything. No normalization is done, i.e. all '.' and '..' will be kept along. Use resolve() to get the canonical path to a file. F)r�)r)rrr�r�rlr�r�r�)r#�objrrr�absolute s z Path.absoluteFcCs�|jr|j�dd�}y|jj||d�}Wn,tk rV}z||��WYdd}~XnX|j|f�}|s�y |j�Wn*tk r�}z||�WYdd}~XnX|S)z� Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows). cSs0t|dd�}|jtks|tkr,td|j��dS)N�winerrorrzSymlink loop from %r)�getattr�errnor�_WINERROR_CANT_RESOLVE_FILENAMEro�filename)�er0rrr� check_eloop(s z!Path.resolve.<locals>.check_eloop)�strictN)rrr�r��OSErrorr�r�)r#r7r6rZr5r[rrr�resolves  z Path.resolvecCs |jj|�S)zh Return the result of the stat() system call on this path, like os.stat() does. )r�r�)r#rrrr�=sz Path.statcCsddl}|j|j�j�jS)z: Return the login name of the file owner. rN)r}r~r��st_uidZpw_name)r#r}rrr�ownerDsz Path.ownercCsddl}|j|j�j�jS)z8 Return the group name of the file gid. rN)�grpZgetgrgidr��st_gidZgr_name)r#r<rrr�groupKsz Path.group�rr7c Cs,|jr|j�tjt|�||||||jd�S)z| Open the file pointed by this path and return a file object, as the built-in open() function does. )�opener)rr�ior�r�r)r#r�� buffering�encoding�errors�newlinerrrr�Rsz Path.openc Cs |jdd�� }|j�SQRXdS)zK Open the file in bytes mode, read it, and close the file. �rb)r�N)r��read)r#r�rrr� read_bytes]szPath.read_bytesc Cs$|jd||d�� }|j�SQRXdS)zJ Open the file in text mode, read it, and close the file. r?)r�rCrDN)r�rG)r#rCrDr�rrr� read_textdszPath.read_textc Cs*t|�}|jdd�� }|j|�SQRXdS)zO Open the file in bytes mode, write to it, and close the file. �wb)r�N)� memoryviewr��write)r#�dataZviewr�rrr� write_byteskszPath.write_bytesc Cs@t|t�std|jj��|jd||d�� }|j|�SQRXdS)zN Open the file in text mode, write to it, and close the file. zdata must be str, not %s�w)r�rCrDN)r�r�r�r�r:r�rL)r#rMrCrDr�rrr� write_textts   zPath.write_textTc Csr|jr|j�|r>y|jj|d�Wntk r8YnXdStjtjB}|sX|tjO}|j ||�}tj |�dS)zS Create this file with the given access mode, if it doesn't exist. N) rrr�r�r8rl�O_CREAT�O_WRONLY�O_EXCLr!�close)r#r��exist_okr�fdrrr�touch~s   z Path.touchc Cs�|jr|j�y|jj||�Wnjtk rf| s@|j|krB�|jjddd�|j|d|d�Yn&tk r�| s�|j� r��YnXdS)z< Create a new directory at this given path. T)r rUFN)rrr�r��FileNotFoundErrorr r8r�)r#r�r rUrrrr��sz Path.mkdircCs |jr|j�|jj||�dS)zF Change the permissions of the path, like os.chmod(). N)rrr�r�)r#r�rrrr��sz Path.chmodcCs |jr|j�|jj||�dS)z� Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's. N)rrr�r�)r#r�rrrr��sz Path.lchmodcCs|jr|j�|jj|�dS)zd Remove this file or link. If the path is a directory, use rmdir() instead. N)rrr�r�)r#rrrr��sz Path.unlinkcCs|jr|j�|jj|�dS)zF Remove this directory. The directory must be empty. N)rrr�r�)r#rrrr��sz Path.rmdircCs|jr|j�|jj|�S)z� Like stat(), except if the path points to a symlink, the symlink's status information is returned, rather than its target's. )rrr�r�)r#rrrr��sz Path.lstatcCs |jr|j�|jj||�dS)z5 Rename this path to the given path. N)rrr�r�)r#�targetrrrr��sz Path.renamecCs |jr|j�|jj||�dS)zo Rename this path to the given path, clobbering the existing destination if it exists. N)rrr�r))r#rYrrrr)�sz Path.replacecCs"|jr|j�|jj|||�dS)z� Make this path a symlink pointing to the given path. Note the order of arguments (self, target) is the reverse of os.symlink's. N)rrr�r�)r#rYr�rrr� symlink_to�szPath.symlink_tocCsBy |j�Wn0tk r<}z|jttfkr.�dSd}~XnXdS)z+ Whether this path exists. FNT)r�r8r2rr)r#r5rrrr��s z Path.existscCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)z3 Whether this path is a directory. FN)r r��st_moder8r2rr)r#r5rrrr��s z Path.is_dircCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)zq Whether this path is a regular file (also True for symlinks pointing to regular files). FN)r r�r[r8r2rr)r#r5rrr�is_files z Path.is_filecCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)z7 Whether this path is a symbolic link. FN)r r�r[r8r2rr)r#r5rrrr�s zPath.is_symlinkcCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)z6 Whether this path is a block device. FN)r r�r[r8r2rr)r#r5rrr�is_block_device"s zPath.is_block_devicecCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)z: Whether this path is a character device. FN)rr�r[r8r2rr)r#r5rrr�is_char_device/s zPath.is_char_devicecCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)z. Whether this path is a FIFO. FN)rr�r[r8r2rr)r#r5rrr�is_fifo<s z Path.is_fifocCsDyt|j�j�Stk r>}z|jttfkr0�dSd}~XnXdS)z0 Whether this path is a socket. FN)r r�r[r8r2rr)r#r5rrr� is_socketIs zPath.is_socketcCsb|jp |j r^|jr^|jddd�dkr^|jj|jddd��}|j|g|jdd��S|S)zl Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser) rNr7�~)r�r�r�r�rrr�)r#Zhomedirrrrr�Vs zPath.expanduser)r�r)N)r)r )FrO)r?rONNN)NN)NN)rT)r FF)F)1r:r;r<r=r�r�r�r�rrrrr!rr"r#r&r(r+r-r/r9r�r;r>r�rHrIrNrPrWr�r�r�r�r�r�r�r)rZr�r�r\r�r]r^r_r`r�rrrrr�s^                      c@seZdZdZfZdS)rzsPath subclass for non-Windows systems. On a POSIX system, instantiating a Path should return this object. N)r:r;r<r=r�rrrrrbsc@s$eZdZdZfZdd�Zdd�ZdS)rzqPath subclass for Windows systems. On a Windows system, instantiating a Path should return this object. cCs td��dS)Nz*Path.owner() is unsupported on this system)r�)r#rrrr;pszWindowsPath.ownercCs td��dS)Nz*Path.group() is unsupported on this system)r�)r#rrrr>sszWindowsPath.groupN)r:r;r<r=r�r;r>rrrrris)>r�r�rArtrlr�r�r-� collectionsr� contextlibrr2rrrr�operatorrr�r r r r r rrZ urllib.parserrfZsupports_symlinks�__all__Z_WINERROR_NOT_READYZ_WINERROR_INVALID_NAMEr3rr�r r>r{rrr�r�rr�r�r�r�r�r�r�r�r�r�PathLike�registerrrrrrrrrr�<module>sd   $  ? 6=  %f   [