• File: pathlib.cpython-37.opt-1.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/pathlib.cpython-37.opt-1.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 40.07 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Lj@s6ddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZddlmZddlmZmZmZmZmZmZmZddlmZddd	d
ddgZd
ZdZdZ ee
eefZ!eee fZ"ddZ#ddZ$Gddde%Z&Gddde&Z'Gddde&Z(e'Z)e(Z*GdddZ+Gddde+Z,e,Z-ddZ.e/ed rfe0e.Z.Gd!d"d"Z1Gd#d$d$Z2Gd%d&d&e1Z3Gd'd(d(e1Z4Gd)d*d*e1Z5Gd+d,d,e	Z6Gd-dde%Z7ej89e7Gd.dde7Z:Gd/d	d	e7Z;Gd0d
d
e7Z<Gd1dde<e:Z=Gd2dde<e;Z>dS)3N)Sequence)EINVALENOENTENOTDIREBADFELOOP)
attrgetter)S_ISDIRS_ISLNKS_ISREGS_ISSOCKS_ISBLKS_ISCHRS_ISFIFO)quote_from_bytesPurePath
PurePosixPathPureWindowsPathPath	PosixPathWindowsPath{icCs t|ddtkpt|ddtkS)Nerrnowinerror)getattr_IGNORED_ERROS_IGNORED_WINERRORS)Z	exceptionr,/opt/alt/python37/lib64/python3.7/pathlib.py
_ignore_error(sr cCsd|kpd|kpd|kS)N*?[r)patrrr_is_wildcard_pattern-sr%c@s(eZdZdZddZddZddZdS)	_FlavourzPA flavour implements a particular (platform-specific) set of path
    semantics.cCs|jj|_dS)N)sepjoin)selfrrr__init__7sz_Flavour.__init__cCsg}|j}|j}d}}t|}x|D]}|s0q&|r@|||}||\}}}	||	krxPt|	|D] }
|
rh|
dkrh|t|
qhWn|	r|	dkr|t|	|s|r&|sx6|D].}|sq|r|||}||d}|rPqWPq&W|s|r||||	|||fS)N.r)
r'altsepreversedreplace	splitrootsplitappendsysinternreverse)r)partsZparsedr'r-drvrootitpartZrelxrrrparse_parts:s@


z_Flavour.parse_partscCsz|r*|sp|rp||||g|ddfSnF|rb||ksJ||||krp||||ddfSn||||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)r7r8r6Zdrv2Zroot2Zparts2rrrjoin_parsed_parts`sz_Flavour.join_parsed_partsN)__name__
__module____qualname____doc__r*r<r?rrrrr&3s&r&c@seZdZdZdZdZeZej	dkZ
edZdZ
ddd	d
hdded
dDBdded
dDBZefddZddZddZddZe
fddZddZddZddZd S)!_WindowsFlavour\/TntZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZz\\?\ZCONZPRNZAUXZNULcCsh|]}d|qS)zCOM%dr).0irrr	<setcomp>sz_WindowsFlavour.<setcomp>r=
cCsh|]}d|qS)zLPT%dr)rHrIrrrrJscCs\|dd}|dd}||krP||krP||\}}|dd}|dd}nd}|dd}||kr||kr||kr||d}|dkr|||d}||dkr|dkrt|}|r||d||||ddfS|d||||ddfSd}	}
|dkr6||jkr6|dd}	|dd}|}||krN|}
||}||	|
|fS)Nrr=r+:)_split_extended_pathfindlen
drive_letterslstrip)r)r:r'firstsecondprefixZthirdindexZindex2r7r8rrrr0s6"

z_WindowsFlavour.splitrootcCs|S)N)lower)r)srrrr>sz_WindowsFlavour.casefoldcCsdd|DS)NcSsg|]}|qSr)rY)rHprrr
<listcomp>sz2_WindowsFlavour.casefold_parts.<locals>.<listcomp>r)r)r6rrrcasefold_partssz_WindowsFlavour.casefold_partscCstt|tjjS)N)recompilefnmatch	translate
IGNORECASE	fullmatch)r)patternrrrcompile_patternsz_WindowsFlavour.compile_patterncCsXd}||rP|dd}|dd}|drP||dd7}d|dd}||fS)Nr+zUNC\rMrE)
startswith)r)rZZ
ext_prefixrWrrrrPs

z$_WindowsFlavour._split_extended_pathcCs6|sdS|ddrdS|ddd|jkS)NFrz\\rNr,)rg	partitionupperreserved_names)r)r6rrris_reserveds
z_WindowsFlavour.is_reservedcCsd|j}t|dkrJ|ddkrJ|ddd}d|t|dfSdt|dSdS)NrLr=rOrFz
file:///%s/%szutf-8zfile:)driverRas_posixrTurlquote_from_bytesencode)r)pathrlrestrrrmake_urisz_WindowsFlavour.make_uricCsdtjkrtjd}n`dtjkr,tjd}nJdtjkrnytjd}Wntk
r\d}YnX|tjd}ntd|rtjd|kr||f\}}}|dtjdkrtd	|||d<|s|r||||d
d}n
||}|S)NHOMEZUSERPROFILEZHOMEPATHZ	HOMEDRIVEr+zCan't determine home directoryZUSERNAMErNz%Can't determine home directory for %rr=)osenvironKeyErrorRuntimeErrorr<r()r)usernameuserhomer7r8r6rrr
gethomedirs,




z_WindowsFlavour.gethomedirN)r@rArBr'r-has_drvntpathpathmodrtnameis_supportedsetrSZext_namespace_prefixrangerjr0r>r]rerPrkrrrzrrrrrDrs"
	'
rDc@sbeZdZdZdZdZeZej	dkZ
efddZddZd	d
Z
ddZd
dZddZddZdS)
_PosixFlavourrFr+FrGcCsV|rH|d|krH||}t|t|dkr<d|d|fSd||fSn
dd|fSdS)NrrLr+)rTrR)r)r:r'Z
stripped_partrrrr0s
z_PosixFlavour.splitrootcCs|S)Nr)r)rZrrrr>sz_PosixFlavour.casefoldcCs|S)Nr)r)r6rrrr]sz_PosixFlavour.casefold_partscCstt|jS)N)r^r_r`rarc)r)rdrrrresz_PosixFlavour.compile_patterncCsdS)NFr)r)r6rrrrksz_PosixFlavour.is_reservedcCst|}dt|S)Nzfile://)bytesrn)r)rpZbpathrrrrr sz_PosixFlavour.make_uricCst|s:y
tjdStk
r6ddl}|tjSXn6ddl}y||jStk
rntd|YnXdS)Nrsrz%Can't determine home directory for %r)	rtrurvpwdgetpwuidgetuidpw_dirgetpwnamrw)r)rxrrrrrz&s
z_PosixFlavour.gethomedirN)r@rArBr'r-r{	posixpathr}rtr~rr0r>r]rerkrrrzrrrrrs
rc@seZdZdZdS)	_AccessorzjAn accessor implements a particular (system-specific or not) way of
    accessing paths on the filesystem.N)r@rArBrCrrrrr:src@seZdZejZejZejZejZejZej	Z	e
edr>ejZnddZejZej
Z
ejZejZejZe
edrvejZn
dddZejZdd	ZejZeejjZeejjZd
S)_NormalAccessorlchmodcCstddS)Nz%lchmod() not available on this system)NotImplementedError)r)ZpathobjmoderrrrPsz_NormalAccessor.lchmodsymlinkFcCstddS)Nz)os.symlink() not available on this system)r)r)srcdsttarget_is_directoryrrrr`sz_NormalAccessor.symlinkcCs
t|S)N)rtreadlink)r)rprrrrfsz_NormalAccessor.readlinkN)F)r@rArBrtstatlstatopenlistdirscandirchmodhasattrrmkdirunlinkrmdirrenamer/rutimergetcwdstaticmethodrp
expanduserrealpathrrrrr?s,


rcCsR|d}|dd}|dkr"t}n$d|kr4tdnt|rBt}nt}||||S)Nrr=z**z:Invalid pattern: '**' can only be an entire path component)_RecursiveWildcardSelector
ValueErrorr%_WildcardSelector_PreciseSelector)
pattern_partsflavourr$child_partsclsrrr_make_selectorws
r	lru_cachec@s eZdZdZddZddZdS)	_SelectorzYA selector matches a specific glob pattern part against the children
    of a given path.cCs0||_|rt|||_d|_nt|_d|_dS)NTF)rr	successordironly_TerminatingSelector)r)rrrrrr*sz_Selector.__init__cCs<t|}|j}|j}|jj}||s,tgS|||||S)zuIterate over all child paths of `parent_path` matched by this
        selector.  This can contain parent_path itself.)typeis_direxists	_accessorriter_select_from)r)parent_pathZpath_clsrrrrrrselect_fromsz_Selector.select_fromN)r@rArBrCr*rrrrrrs	rc@seZdZddZdS)rccs
|VdS)Nr)r)rrrrrrrrsz!_TerminatingSelector._select_fromN)r@rArBrrrrrrsrc@seZdZddZddZdS)rcCs||_t|||dS)N)r~rr*)r)r~rrrrrr*sz_PreciseSelector.__init__ccs^yD||j}|jr|n||rBx |j||||D]
}|Vq4WWntk
rXdSXdS)N)_make_child_relpathr~rrrPermissionError)r)rrrrrpr[rrrrsz_PreciseSelector._select_fromN)r@rArBr*rrrrrrsrc@seZdZddZddZdS)rcCs|||_t|||dS)N)rematchrr*)r)r$rrrrrr*sz_WildcardSelector.__init__ccsy||}t|}WdQRXx|D]}|jrly|s:w$Wn.tk
rj}zt|sXw$Wdd}~XYnX|j}	||	r$||	}
x |j	|
|||D]
}|VqWq$WWnt
k
rdSXdS)N)listrrOSErrorr r~rrrrr)r)rrrr
scandir_itentriesentryer~rpr[rrrrs&



z_WildcardSelector._select_fromN)r@rArBr*rrrrrrsrc@s$eZdZddZddZddZdS)rcCst|||dS)N)rr*)r)r$rrrrrr*sz#_RecursiveWildcardSelector.__init__ccs|Vy||}t|}WdQRXx|D]x}d}y|}Wn,tk
rj}zt|sZWdd}~XYnX|r*|s*||j}	x||	||D]
}
|
VqWq*WWntk
rdSXdS)NF)	rrrr 
is_symlinkrr~_iterate_directoriesr)r)rrrrrrZentry_is_dirrrpr[rrrrs"

z/_RecursiveWildcardSelector._iterate_directoriesc	csyjt}zT|jj}xF||||D]4}x.|||||D]}||kr6|V||q6Wq"WWd|XWntk
r~dSXdS)N)rrrraddclearr)	r)rrrrZyieldedZsuccessor_selectZstarting_pointr[rrrrsz'_RecursiveWildcardSelector._select_fromN)r@rArBr*rrrrrrrsrc@s4eZdZdZdZddZddZddZd	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)rrrrr)r)rprrrr*s
z_PathParents.__init__cCs(|js|jrt|jdSt|jSdS)Nr=)rrrRr)r)rrr__len__sz_PathParents.__len__cCs@|dks|t|krt||j|j|j|jd|dS)Nrr=)rR
IndexErrorr_from_parsed_partsrrr)r)idxrrr__getitem__sz_PathParents.__getitem__cCsd|jjS)Nz<{}.parents>)formatrr@)r)rrr__repr__sz_PathParents.__repr__N)	r@rArBrC	__slots__r*rrrrrrrrsrc@seZdZdZdZddZddZeddZedVd
dZ	edWdd
Z
eddZddZddZ
ddZddZddZddZddZddZed d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zeed.d/d0Zeed1d2d0Zed3d4Zed5d6Z ed7d8Z!ed9d:Z"ed;d<Z#d=d>Z$d?d@Z%dAdBZ&edCdDZ'dEdFZ(dGdHZ)dIdJZ*edKdLZ+edMdNZ,dOdPZ-dQdRZ.dSdTZ/dUS)Xra|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.
    )rrr_str_hash_pparts_cached_cpartscGs$|tkrtjdkrtnt}||S)zConstruct 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.
        rG)rrtr~rr_from_parts)rargsrrr__new__,szPurePath.__new__cCs|jt|jfS)N)	__class__tupler)r)rrr
__reduce__6szPurePath.__reduce__cCshg}xV|D]N}t|tr$||j7}q
t|}t|trH|t|q
tdt|q
W|j	
|S)NzNargument should be a str object or an os.PathLike object returning str, not %r)
isinstancerrrtfspathstrr2	TypeErrorr_flavourr<)rrr6arrr_parse_args;s



zPurePath._parse_argsTcCs<t|}||\}}}||_||_||_|r8||S)N)objectrrrrr_init)rrinitr)r7r8r6rrrrOs
zPurePath._from_partscCs,t|}||_||_||_|r(||S)N)rrrrrr)rr7r8r6rr)rrrr\s
zPurePath._from_parsed_partscCs4|s|r$|||j|ddS|j|SdS)Nr=)rr()rr7r8r6rrr_format_parsed_partsfszPurePath._format_parsed_partscCsdS)Nr)r)rrrrmszPurePath._initcCs@||\}}}|j|j|j|j|||\}}}||||S)N)rrr?rrrr)r)rr7r8r6rrr_make_childqszPurePath._make_childcCs<y|jStk
r6||j|j|jp,d|_|jSXdS)z[Return the string representation of the path, suitable for
        passing to system calls.r,N)rAttributeErrorrrrr)r)rrr__str__wszPurePath.__str__cCst|S)N)r)r)rrr
__fspath__szPurePath.__fspath__cCs|j}t||jdS)zNReturn the string representation of the path with forward (/)
        slashes.rF)rrr/r')r)frrrrmszPurePath.as_posixcCs
t|S)zaReturn the bytes representation of the path.  This is only
        recommended to use under Unix.)rtfsencode)r)rrr	__bytes__szPurePath.__bytes__cCsd|jj|S)Nz{}({!r}))rrr@rm)r)rrrrszPurePath.__repr__cCs|std|j|S)z Return the path as a 'file' URI.z.relative path can't be expressed as a file URI)is_absoluterrrr)r)rrras_uriszPurePath.as_uricCs2y|jStk
r,|j|j|_|jSXdS)N)rrrr]r)r)rrr_cpartss
zPurePath._cpartscCs&t|tstS|j|jko$|j|jkS)N)rrNotImplementedrr)r)otherrrr__eq__s
zPurePath.__eq__cCs2y|jStk
r,tt|j|_|jSXdS)N)rrhashrr)r)rrr__hash__s
zPurePath.__hash__cCs&t|tr|j|jk	rtS|j|jkS)N)rrrrr)r)rrrr__lt__szPurePath.__lt__cCs&t|tr|j|jk	rtS|j|jkS)N)rrrrr)r)rrrr__le__szPurePath.__le__cCs&t|tr|j|jk	rtS|j|jkS)N)rrrrr)r)rrrr__gt__szPurePath.__gt__cCs&t|tr|j|jk	rtS|j|jkS)N)rrrrr)r)rrrr__ge__szPurePath.__ge__rz.The drive prefix (letter or UNC path), if any.)docrzThe root of the path, if any.cCs|j|j}|S)z/The concatenation of the drive and root, or ''.)rr)r)anchorrrrrszPurePath.anchorcCs.|j}t||js|jrdndkr&dS|dS)z!The final path component, if any.r=rr+rN)rrRrr)r)r6rrrr~sz
PurePath.namecCsD|j}|d}d|kr,t|dkr<nn||dSdSdS)z{
        The final component's last suffix, if any.

        This includes the leading period. For example: '.txt'
        r,rr=Nr+)r~rfindrR)r)r~rIrrrsuffixs

 zPurePath.suffixcCs:|j}|drgS|d}dd|dddDS)z
        A list of the final component's suffixes, if any.

        These include the leading periods. For example: ['.tar', '.gz']
        r,cSsg|]}d|qS)r,r)rHrrrrr\sz%PurePath.suffixes.<locals>.<listcomp>r=N)r~endswithrTr1)r)r~rrrsuffixess


zPurePath.suffixescCsD|j}|d}d|kr,t|dkr<nn|d|S|SdS)z0The final path component, minus its last suffix.r,rr=N)r~rrR)r)r~rIrrrstems

 z
PurePath.stemcCs|jstd|f|j|f\}}}|rX|d|jj|jjgksX|sX|sXt|dkrdtd|||j|j	|j
dd|gS)z-Return a new path with the file name changed.z%r has an empty namerNr=zInvalid name %rN)r~rrr<r'r-rRrrrr)r)r~r7r8r6rrr	with_nameszPurePath.with_namecCs|j}|j|ks |jr.|j|kr.td|f|r<|drD|dkrPtd||j}|shtd|f|j}|s|||}n|dt||}||j	|j
|jdd|gS)zReturn 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 nameNrN)rr'r-rrgr~rrRrrrr)r)rrr~Z
old_suffixrrrwith_suffixs
zPurePath.with_suffixc
Gs|std|j}|j}|j}|r8||g|dd}n|}||\}}}|rf||g|dd}	n|}	t|	}
|jj}|
dkr|s|rn||d|
||	kr||||}t	d
t|t||d|
dkr|nd||
dS)zReturn 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 argumentr=Nrz{!r} does not start with {!r}r+)
rrrrrrRrr]rrrrr)
r)rr6r7r8Z	abs_partsZto_drvZto_rootZto_partsZto_abs_partsncfZ	formattedrrrrelative_tos(	*zPurePath.relative_tocCs.y|jStk
r(t|j|_|jSXdS)zZAn object providing sequence-like access to the
        components in the filesystem path.N)rrrr)r)rrrr6:s
zPurePath.partscGs
||S)zCombine 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)rrrrjoinpathFszPurePath.joinpathcCs||fS)N)r)r)keyrrr__truediv__NszPurePath.__truediv__cCs||g|jS)N)rr)r)r	rrr__rtruediv__QszPurePath.__rtruediv__cCs@|j}|j}|j}t|dkr*|s&|r*|S||||ddS)zThe logical parent of the path.r=NrN)rrrrRr)r)r7r8r6rrrparentTszPurePath.parentcCst|S)z*A sequence of this path's logical parents.)r)r)rrrparents^szPurePath.parentscCs|js
dS|jjpt|jS)zSTrue if the path is absolute (has both a root and, if applicable,
        a drive).F)rrr{boolr)r)rrrrcszPurePath.is_absolutecCs|j|jS)zaReturn True if the path contains one of the special names reserved
        by the system, if any.)rrkr)r)rrrrkjszPurePath.is_reservedc	Cs|jj}||}|j|f\}}}|s0td|rF|||jkrFdS|r\|||jkr\dS|j}|sj|rt|t|kr~dS|dd}nt|t|krdSx.tt	|t	|D]\}}t
||sdSqWdS)zE
        Return True if this path matches the given pattern.
        z
empty patternFr=NT)rr>r<rrrrrRzipr.r`Zfnmatchcase)	r)Zpath_patternrr7r8Z	pat_partsr6r:r$rrrros(zPurePath.matchN)T)T)0r@rArBrCrrrclassmethodrrrrrrrrrmrrrpropertyrrrrrrrrrlr8rr~rrrrrrr6rr
rrr
rrkrrrrrrs\
	
	

 
c@seZdZdZeZdZdS)rzPurePath 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.
    rN)r@rArBrC_posix_flavourrrrrrrrsc@seZdZdZeZdZdS)rzPurePath 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.
    rN)r@rArBrC_windows_flavourrrrrrrrsc@seZdZdZdZddZdbddZdd	Zd
dZdd
Z	ddZ
dcddZddddZe
ddZe
ddZddZddZddZd d!Zd"d#Zded%d&Zd'd(Zd)d*Zd+d,Zdfd/d0Zd1d2Zdgd3d4Zd5d6Zdhd7d8Zdid:d;Zdjd<d=Zd>d?Z d@dAZ!dBdCZ"dDdEZ#dFdGZ$dHdIZ%dJdKZ&dkdLdMZ'dNdOZ(dPdQZ)dRdSZ*dTdUZ+dVdWZ,dXdYZ-dZd[Z.d\d]Z/d^d_Z0d`daZ1dS)lraPurePath 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|
|S)NrGF)rz$cannot instantiate %r on your system)rrtr~rrrrrrr@r)rrkwargsr)rrrrszPath.__new__NcCs"d|_|dk	r|j|_nt|_dS)NF)rr_normal_accessor)r)templaterrrrs
z
Path._initcCs|j|g}||j|j|S)N)rrrr)r)r:r6rrrrszPath._make_child_relpathcCs|jr||S)N)r
_raise_closed)r)rrr	__enter__szPath.__enter__cCs
d|_dS)NT)r)r)tvtbrrr__exit__sz
Path.__exit__cCstddS)NzI/O operation on closed path)r)r)rrrrszPath._raise_closedcCs|j|||S)N)rr)r)r~flagsrrrr_openerszPath._openercCs|jr||j|||S)zm
        Open the file pointed by this path and return a file descriptor,
        as os.open() does.
        )rrrr)r)rrrrr	_raw_openszPath._raw_opencCs|tS)zjReturn a new path pointing to the current working directory
        (as returned by os.getcwd()).
        )rtr)rrrrcwdszPath.cwdcCs||jdS)zrReturn a new path pointing to the user's home directory (as
        returned by os.path.expanduser('~')).
        N)rrz)rrrrhomesz	Path.homecCsB|}y|}Wntk
r2t|}YnXtj||S)zoReturn whether other_path is the same or not as this file
        (as returned by os.path.samefile()).
        )rrrtrpsamestat)r)Z
other_pathstZother_strrrsamefilesz
Path.samefileccsL|jr|x8|j|D](}|dkr*q||V|jr|qWdS)zyIterate over the files in this directory.  Does not yield any
        result for the special paths '.' and '..'.
        >r,..N)rrrrr)r)r~rrriterdirszPath.iterdirccsd|std||j|f\}}}|s.|r6tdtt||j}x||D]
}|VqRWdS)zIterate over this subtree and yield all existing files (of any
        kind, including directories) matching the given relative pattern.
        zUnacceptable pattern: {!r}z%Non-relative patterns are unsupportedN)rrrr<rrrr)r)rdr7r8rselectorr[rrrglob
sz	Path.globccsV|j|f\}}}|s|r$tdtdt||j}x||D]
}|VqDWdS)zRecursively yield all existing files (of any kind, including
        directories) matching the given relative pattern, anywhere in
        this subtree.
        z%Non-relative patterns are unsupported)z**N)rr<rrrr)r)rdr7r8rr*r[rrrrglobsz
Path.rglobcCsD|jr||r|S|jtg|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)rrrrrtrrr)r)objrrrabsolute&sz
Path.absoluteFc
Cs|jr|dd}y|jj||d}Wn,tk
rV}z||Wdd}~XYnX||f}|sy|Wn*tk
r}z||Wdd}~XYnX|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|jdS)NrrzSymlink loop from %r)rrr_WINERROR_CANT_RESOLVE_FILENAMErwfilename)rrrrrcheck_eloopAsz!Path.resolve.<locals>.check_eloop)strictN)rrrrrrr)r)r2r1rZrr[rrrresolve8szPath.resolvecCs|j|S)zh
        Return the result of the stat() system call on this path, like
        os.stat() does.
        )rr)r)rrrrVsz	Path.statcCsddl}||jjS)z:
        Return the login name of the file owner.
        rN)rrrst_uidZpw_name)r)rrrrowner]sz
Path.ownercCsddl}||jjS)z8
        Return the group name of the file gid.
        rN)grpZgetgrgidrst_gidZgr_name)r)r6rrrgroupdsz
Path.grouprrNc	Cs(|jr|tj|||||||jdS)z|
        Open the file pointed by this path and return a file object, as
        the built-in open() function does.
        )opener)rriorr )r)r	bufferingencodingerrorsnewlinerrrrksz	Path.openc	Cs |jdd
}|SQRXdS)zK
        Open the file in bytes mode, read it, and close the file.
        rb)rN)rread)r)rrrr
read_bytesvszPath.read_bytesc	Cs$|jd||d
}|SQRXdS)zJ
        Open the file in text mode, read it, and close the file.
        r9)rr=r>N)rrA)r)r=r>rrrr	read_text}szPath.read_textc	Cs*t|}|jdd}||SQRXdS)zO
        Open the file in bytes mode, write to it, and close the file.
        wb)rN)
memoryviewrwrite)r)dataZviewrrrrwrite_bytesszPath.write_bytesc	Cs@t|tstd|jj|jd||d}||SQRXdS)zN
        Open the file in text mode, write to it, and close the file.
        zdata must be str, not %sw)rr=r>N)rrrrr@rrF)r)rGr=r>rrrr
write_texts

zPath.write_textTcCsr|jr||r>y|j|dWntk
r8YnXdStjtjB}|sX|tjO}|	||}t
|dS)zS
        Create this file with the given access mode, if it doesn't exist.
        N)rrrrrrtO_CREATO_WRONLYO_EXCLr"close)r)rexist_okrfdrrrtouchs
z
Path.touchcCs|jr|y|j||Wndtk
rd|r>|j|kr@|jjddd|j|d|dYn"tk
r|r~|sYnXdS)z<
        Create a new directory at this given path.
        T)r
rOFN)rrrrFileNotFoundErrorrrr)r)rr
rOrrrrsz
Path.mkdircCs |jr||j||dS)zF
        Change the permissions of the path, like os.chmod().
        N)rrrr)r)rrrrrsz
Path.chmodcCs |jr||j||dS)z
        Like chmod(), except if the path points to a symlink, the symlink's
        permissions are changed, rather than its target's.
        N)rrrr)r)rrrrrszPath.lchmodcCs|jr||j|dS)zd
        Remove this file or link.
        If the path is a directory, use rmdir() instead.
        N)rrrr)r)rrrrszPath.unlinkcCs|jr||j|dS)zF
        Remove this directory.  The directory must be empty.
        N)rrrr)r)rrrrsz
Path.rmdircCs|jr||j|S)z
        Like stat(), except if the path points to a symlink, the symlink's
        status information is returned, rather than its target's.
        )rrrr)r)rrrrsz
Path.lstatcCs |jr||j||dS)z5
        Rename this path to the given path.
        N)rrrr)r)targetrrrrszPath.renamecCs |jr||j||dS)zo
        Rename this path to the given path, clobbering the existing
        destination if it exists.
        N)rrrr/)r)rSrrrr/szPath.replacecCs"|jr||j|||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)rrrr)r)rSrrrr
symlink_toszPath.symlink_toc
Cs>y|Wn,tk
r8}zt|s(dSd}~XYnXdS)z+
        Whether this path exists.
        FNT)rrr )r)rrrrrszPath.existsc
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)z3
        Whether this path is a directory.
        FN)r	rst_moderr )r)rrrrrszPath.is_dirc
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)zq
        Whether this path is a regular file (also True for symlinks pointing
        to regular files).
        FN)rrrUrr )r)rrrris_file!szPath.is_filecCst|r|sdSt|j}y|j}Wntk
r@dSX|j}||krXdS|j}|j}||kS)z;
        Check if this path is a POSIX mount point
        FT)rrrrrst_devrst_ino)r)rZ
parent_devZdevZinoZ
parent_inorrris_mount/s



z
Path.is_mountc
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)z7
        Whether this path is a symbolic link.
        FN)r
rrUrr )r)rrrrrDszPath.is_symlinkc
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)z6
        Whether this path is a block device.
        FN)r
rrUrr )r)rrrris_block_devicePszPath.is_block_devicec
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)z:
        Whether this path is a character device.
        FN)rrrUrr )r)rrrris_char_device]szPath.is_char_devicec
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)z.
        Whether this path is a FIFO.
        FN)rrrUrr )r)rrrris_fifojszPath.is_fifoc
Cs@yt|jStk
r:}zt|s*dSd}~XYnXdS)z0
        Whether this path is a socket.
        FN)rrrUrr )r)rrrr	is_socketwszPath.is_socketcCs`|js\|js\|jr\|jddddkr\|j|jddd}||g|jddS|S)zl Return a new path with expanded ~ and ~user constructs
        (as returned by os.path.expanduser)
        rNr=~)rrrrrzr)r)Zhomedirrrrrs
zPath.expanduser)N)r)r!)F)r9rNNNN)NN)NN)rT)r!FF)F)2r@rArBrCrrrrrrrr r"rr#r$r'r)r+r,r.r3rr5r8rrBrCrHrJrQrrrrrrrr/rTrrrVrYrrZr[r\r]rrrrrrs^







	



				





c@seZdZdZdZdS)rzsPath subclass for non-Windows systems.

    On a POSIX system, instantiating a Path should return this object.
    rN)r@rArBrCrrrrrrsc@s,eZdZdZdZddZddZddZd	S)
rzqPath subclass for Windows systems.

    On a Windows system, instantiating a Path should return this object.
    rcCstddS)Nz*Path.owner() is unsupported on this system)r)r)rrrr5szWindowsPath.ownercCstddS)Nz*Path.group() is unsupported on this system)r)r)rrrr8szWindowsPath.groupcCstddS)Nz-Path.is_mount() is unsupported on this system)r)r)rrrrYszWindowsPath.is_mountN)r@rArBrCrr5r8rYrrrrrs
)?r`	functoolsr;r|rtrr^r3_collections_abcrrrrrrroperatorrrr	r
rrr
rrZurllib.parserrn__all__Z_WINERROR_NOT_READYZ_WINERROR_INVALID_NAMEr/rrr r%rr&rDrrrrrrrrrrrrrrrrPathLikeregisterrrrrrrrrr<module>sj$
?91
,n

o