%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/__pycache__/pathlib.cpython-38.pyc

U

na@sjddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZddlmZddlmZmZmZmZmZmZmZddlmZdZejdkrddlZe dd	d
krddlm!Z!qdZdZ!ndZd
dddddgZ"ee
eefZ#dZ$ddZ%ddZ&Gddde'Z(Gddde(Z)Gddde(Z*e)Z+e*Z,GdddZ-Gd d!d!e-Z.e.Z/d"d#Z0e1ed$re2e0Z0Gd%d&d&Z3Gd'd(d(Z4Gd)d*d*e3Z5Gd+d,d,e3Z6Gd-d.d.e3Z7Gd/d0d0e	Z8Gd1d
d
e'Z9ej:;e9Gd2dde9Z<Gd3dde9Z=Gd4dde9Z>Gd5dde>e<Z?Gd6dde>e=Z@dS)7N)Sequence)EINVALENOENTENOTDIREBADFELOOP)
attrgetter)S_ISDIRS_ISLNKS_ISREGS_ISSOCKS_ISBLKS_ISCHRS_ISFIFO)quote_from_bytesTnt)r)_getfinalpathnameFPurePath
PurePosixPathPureWindowsPathPath	PosixPathWindowsPath){icCs t|ddtkpt|ddtkS)Nerrnowinerror)getattr_IGNORED_ERROS_IGNORED_WINERRORS)	exceptionr##/usr/local/lib/python3.8/pathlib.py
_ignore_error.sr%cCsd|kpd|kpd|kS)N*?[r#)patr#r#r$_is_wildcard_pattern3sr*c@s(eZdZdZddZddZddZdS)	_FlavourzPA flavour implements a particular (platform-specific) set of path
    semantics.cCs|jj|_dSN)sepjoinselfr#r#r$__init__=sz_Flavour.__init__cCsg}|j}|j}d}}t|}|D]}|s.q$|r>|||}||\}}}	||	krt|	|D] }
|
rd|
dkrd|t|
qdn|	r|	dkr|t|	|s|r$|s|D]0}|sq|r|||}||d}|rqqqq$|s|r||||	|||fS)N.r)
r-altsepreversedreplace	splitrootsplitappendsysinternreverse)r0partsZparsedr-r4drvrootitpartZrelxr#r#r$parse_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)r0r>r?r=Zdrv2Zroot2Zparts2r#r#r$join_parsed_partsfsz_Flavour.join_parsed_partsN)__name__
__module____qualname____doc__r1rCrFr#r#r#r$r+9s&r+c@seZdZdZdZdZeZej	dkZ
edZdZ
ddd	d
hdded
dDBdded
dDBZefddZddZddZddZd&ddZe
fddZddZdd Zd!d"Zd#d$Zd%S)'_WindowsFlavour\/TrZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZz\\?\ZCONZPRNZAUXZNULcCsh|]}d|qS)zCOM%dr#.0ir#r#r$	<setcomp>sz_WindowsFlavour.<setcomp>rD
cCsh|]}d|qS)zLPT%dr#rNr#r#r$rQscCs\|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)NrrDrr2:)_split_extended_pathfindlen
drive_letterslstrip)r0rAr-firstsecondprefixZthirdindexZindex2r>r?r#r#r$r7s6"

z_WindowsFlavour.splitrootcCs|Sr,lowerr0sr#r#r$rEsz_WindowsFlavour.casefoldcCsdd|DS)NcSsg|]}|qSr#r_)rOpr#r#r$
<listcomp>sz2_WindowsFlavour.casefold_parts.<locals>.<listcomp>r#r0r=r#r#r$casefold_partssz_WindowsFlavour.casefold_partscCstt|tjjSr,)recompilefnmatch	translate
IGNORECASE	fullmatchr0patternr#r#r$compile_patternsz_WindowsFlavour.compile_patternFcCst|}|stSd}tdk	r|r2|t|Sg}z|t|}WnBtk
r|}tj|\}}||||kr|YSYq6Xtjj	|ft
|Sq6dSr,)strosgetcwdr_ext_to_normalFileNotFoundErrorpathr8r9r.r5)r0rustrictrbZ
previous_sZ
tail_partstailr#r#r$resolves$
z_WindowsFlavour.resolvecCsXd}||rP|dd}|dd}|drP||dd7}d|dd}||fS)Nr2zUNC\rSrL)
startswith)r0rbZ
ext_prefixr]r#r#r$rVs

z$_WindowsFlavour._split_extended_pathcCs||dSNrD)rVrar#r#r$rssz_WindowsFlavour._ext_to_normalcCs6|sdS|ddrdS|ddd|jkS)NFrz\\rTr3)rz	partitionupperreserved_namesrer#r#r$is_reserveds
z_WindowsFlavour.is_reservedcCsd|j}t|dkrJ|ddkrJ|ddd}d|t|dfSdt|dSdS)NrrDrUrMz
file:///%s/%szutf-8zfile:)driverXas_posixrZurlquote_from_bytesencode)r0rurrestr#r#r$make_urisz_WindowsFlavour.make_uricCsdtjkrtjd}nJdtjkrXztjd}Wntk
rFd}YnX|tjd}ntd|rtjd|kr||f\}}}|dtjdkrtd|||d<|s|r||||d	d}n
||}|S)
NZUSERPROFILEZHOMEPATHZ	HOMEDRIVEr2zCan't determine home directoryZUSERNAMErT%Can't determine home directory for %rrD)rqenvironKeyErrorRuntimeErrorrCr.)r0usernameuserhomer>r?r=r#r#r$
gethomedirs*



z_WindowsFlavour.gethomedirN)F)rGrHrIr-r4has_drvntpathpathmodrqnameis_supportedsetrYZext_namespace_prefixranger~r7rErfrorxrVrsrrrr#r#r#r$rKxs.

'

rKc@sleZdZdZdZdZeZej	dkZ
efddZddZd	d
Z
ddZdd
dZddZddZddZdS)
_PosixFlavourrMr2FrcCsV|rH|d|krH||}t|t|dkr<d|d|fSd||fSn
dd|fSdS)Nrrr2)rZrX)r0rAr-Z
stripped_partr#r#r$r7%s
z_PosixFlavour.splitrootcCs|Sr,r#rar#r#r$rE4sz_PosixFlavour.casefoldcCs|Sr,r#rer#r#r$rf7sz_PosixFlavour.casefold_partscCstt|jSr,)rgrhrirjrlrmr#r#r$ro:sz_PosixFlavour.compile_patterncsJ|j|jifdd|r0dnt}|t|pHS)Ncs|rd}|D]}|r|dkr*q|dkrD|\}}}q|rX||}n||}|kr|}|dk	r~qtd|z|}Wn6tk
r}z|jtkrr|}W5d}~XYqXd|<||}||<q|S)Nr2r3..zSymlink loop from %r)	rzr8
rpartitionendswithrreadlinkOSErrorrr)rurr_newpathtargete_resolveZaccessorseenr-rvr#r$rAs4




z'_PosixFlavour.resolve.<locals>._resolver2)r-	_accessoris_absoluterqrrrp)r0rurvbaser#rr$rx=s)z_PosixFlavour.resolvecCsdSNFr#rer#r#r$rmsz_PosixFlavour.is_reservedcCst|}dt|S)Nzfile://)bytesr)r0ruZbpathr#r#r$rpsz_PosixFlavour.make_uricCs||s@ztjdWStk
r<ddl}|tjYSXn8ddl}z||jWStk
rvtd|YnXdS)NHOMErr)	rqrrpwdgetpwuidgetuidpw_dirgetpwnamr)r0rrr#r#r$rvsz_PosixFlavour.gethomedirN)F)rGrHrIr-r4r	posixpathrrqrrr7rErfrorxrrrr#r#r#r$rs

0rc@seZdZdZdS)	_AccessorzjAn accessor implements a particular (system-specific or not) way of
    accessing paths on the filesystem.N)rGrHrIrJr#r#r#r$rsrc@seZdZejZejZejZejZejZej	Z	e
edr>ejZnddZejZej
Z
e
edrdejZneddZejZejZejZererejZqddZned	dZejZd
dZdS)
_NormalAccessorlchmodcCstddS)Nz%lchmod() not available on this systemNotImplementedError)r0Zpathobjmoder#r#r$rsz_NormalAccessor.lchmodlinkcCstddS)Nz&os.link() not available on this systemrr0rr#r#r$link_tosz_NormalAccessor.link_tocCstddS)Nz&symlink() not available on this systemrabtarget_is_directoryr#r#r$symlinksz_NormalAccessor.symlinkcCst||Sr,)rqrrr#r#r$rscCs
t|Sr,)rqrr0rur#r#r$rsz_NormalAccessor.readlinkN)rGrHrIrqstatlstatopenlistdirscandirchmodhasattrrmkdirunlinkrrstaticmethodrmdirrenamer6rsupports_symlinksrutimerr#r#r#r$rs4




rcCsR|d}|dd}|dkr"t}n$d|kr4tdnt|rBt}nt}||||S)NrrD**z:Invalid pattern: '**' can only be an entire path component)_RecursiveWildcardSelector
ValueErrorr*_WildcardSelector_PreciseSelector)
pattern_partsflavourr)child_partsclsr#r#r$_make_selectors
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)r0rrr#r#r$r1s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_direxistsrriter_select_from)r0parent_pathZpath_clsrrrr#r#r$select_fromsz_Selector.select_fromN)rGrHrIrJr1rr#r#r#r$rs	rc@seZdZddZdS)rccs
|VdSr,r#)r0rrrrr#r#r$rsz!_TerminatingSelector._select_fromN)rGrHrIrr#r#r#r$rsrc@seZdZddZddZdS)rcCs||_t|||dSr,)rrr1)r0rrrr#r#r$r1sz_PreciseSelector.__init__ccs\z@||j}|jr|n||r>|j||||D]
}|Vq2Wntk
rVYdSXdSr,)_make_child_relpathrrrrPermissionError)r0rrrrrurcr#r#r$rsz_PreciseSelector._select_fromNrGrHrIr1rr#r#r#r$rsrc@seZdZddZddZdS)rcCs|||_t|||dSr,)romatchrr1r0r)rrr#r#r$r1sz_WildcardSelector.__init__ccsz||}t|}W5QRX|D]}|jrrz|s:Wq"Wn4tk
rp}zt|sXWYq"W5d}~XYnX|j}	||	r"||	}
|j	|
|||D]
}|Vqq"Wnt
k
rYdSXdSr,)listrrrr%rrrrrr)r0rrrr
scandir_itentriesentryrrrurcr#r#r$rs&


z_WildcardSelector._select_fromNrr#r#r#r$rsrc@s$eZdZddZddZddZdS)rcCst|||dSr,)rr1rr#r#r$r1/sz#_RecursiveWildcardSelector.__init__ccs|Vz||}t|}W5QRX|D]t}d}z|}Wn,tk
rh}zt|sXW5d}~XYnX|r(|s(||j}	||	||D]
}
|
Vqq(Wntk
rYdSXdSr)	rrrr%
is_symlinkrr_iterate_directoriesr)r0rrrrrrZentry_is_dirrrurcr#r#r$r2s"
z/_RecursiveWildcardSelector._iterate_directoriesc	cs~zbt}zL|jj}||||D]0}|||||D]}||kr2|V||q2q W5|XWntk
rxYdSXdSr,)rclearrrraddr)	r0rrrrZyieldedZsuccessor_selectZstarting_pointrcr#r#r$rEsz'_RecursiveWildcardSelector._select_fromN)rGrHrIr1rrr#r#r#r$r-src@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|_dSr,)rrrrrrr#r#r$r1^s
z_PathParents.__init__cCs(|js|jrt|jdSt|jSdSr{)rrrXrr/r#r#r$__len__esz_PathParents.__len__cCs@|dks|t|krt||j|j|j|jd|dS)NrrD)rX
IndexErrorr_from_parsed_partsrrr)r0idxr#r#r$__getitem__ks
z_PathParents.__getitem__cCsd|jjS)Nz<{}.parents>)formatrrGr/r#r#r$__repr__qsz_PathParents.__repr__N)	rGrHrIrJ	__slots__r1rrrr#r#r#r$rYs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.
        r)rrqrrr_from_parts)rargsr#r#r$__new__szPurePath.__new__cCs|jt|jfSr,)	__class__tuplerr/r#r#r$
__reduce__szPurePath.__reduce__cCsdg}|D]N}t|tr"||j7}qt|}t|trF|t|qtdt|q|j	
|S)NzNargument should be a str object or an os.PathLike object returning str, not %r)
isinstancerrrqfspathrpr9	TypeErrorr_flavourrC)rrr=rr#r#r$_parse_argss


zPurePath._parse_argsTcCs<t|}||\}}}||_||_||_|r8||Sr,)objectrrrrr_init)rrinitr0r>r?r=r#r#r$rs
zPurePath._from_partscCs,t|}||_||_||_|r(||Sr,)r	rrrrr
)rr>r?r=rr0r#r#r$rs
zPurePath._from_parsed_partscCs4|s|r$|||j|ddS|j|SdSr{)rr.)rr>r?r=r#r#r$_format_parsed_partsszPurePath._format_parsed_partscCsdSr,r#r/r#r#r$r
szPurePath._initcCs@||\}}}|j|j|j|j|||\}}}||||Sr,)rrrFrrrr)r0rr>r?r=r#r#r$_make_childs
zPurePath._make_childcCsBz|jWStk
r<||j|j|jp.d|_|jYSXdS)z[Return the string representation of the path, suitable for
        passing to system calls.r3N)rAttributeErrorrrrrr/r#r#r$__str__szPurePath.__str__cCst|Sr,)rpr/r#r#r$
__fspath__szPurePath.__fspath__cCs|j}t||jdS)zNReturn the string representation of the path with forward (/)
        slashes.rM)rrpr6r-r0fr#r#r$rszPurePath.as_posixcCs
t|S)zaReturn the bytes representation of the path.  This is only
        recommended to use under Unix.)rqfsencoder/r#r#r$	__bytes__szPurePath.__bytes__cCsd|jj|S)Nz{}({!r}))rrrGrr/r#r#r$rszPurePath.__repr__cCs|std|j|S)z Return the path as a 'file' URI.z.relative path can't be expressed as a file URI)rrrrr/r#r#r$as_uriszPurePath.as_uricCs8z|jWStk
r2|j|j|_|jYSXdSr,)rrrrfrr/r#r#r$_cpartss
zPurePath._cpartscCs&t|tstS|j|jko$|j|jkSr,)rrNotImplementedrrr0otherr#r#r$__eq__s
zPurePath.__eq__cCs8z|jWStk
r2tt|j|_|jYSXdSr,)rrhashrrr/r#r#r$__hash__s
zPurePath.__hash__cCs&t|tr|j|jk	rtS|j|jkSr,rrrrrrr#r#r$__lt__szPurePath.__lt__cCs&t|tr|j|jk	rtS|j|jkSr,rrr#r#r$__le__	szPurePath.__le__cCs&t|tr|j|jk	rtS|j|jkSr,rrr#r#r$__gt__szPurePath.__gt__cCs&t|tr|j|jk	rtS|j|jkSr,rrr#r#r$__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)r0anchorr#r#r$r#szPurePath.anchorcCs.|j}t||js|jrdndkr&dS|dS)z!The final path component, if any.rDrr2rT)rrXrrrer#r#r$r$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'
        r3rrDNr2rrfindrXr0rrPr#r#r$suffix,s

 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']
        r3cSsg|]}d|qS)r3r#)rOr'r#r#r$rdEsz%PurePath.suffixes.<locals>.<listcomp>rDN)rrrZr8r0rr#r#r$suffixes:s


zPurePath.suffixescCsD|j}|d}d|kr,t|dkr<nn|d|S|SdS)z0The final path component, minus its last suffix.r3rrDNr$r&r#r#r$stemGs

 z
PurePath.stemcCs|jstd|f|j|f\}}}|rX|d|jj|jjfksX|sX|sXt|dkrdtd|||j|j	|j
dd|gS)z-Return a new path with the file name changed.%r has an empty namerTrDzInvalid name %rN)rrrrCr-r4rXrrrr)r0rr>r?r=r#r#r$	with_nameQs
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 %rr3r+NrT)rr-r4rrzrr'rXrrrr)r0r'rrZ
old_suffixr#r#r$with_suffix\s
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 argumentrDNrz{!r} does not start with {!r}r2)
rrrrrrXrrfrrrrpr)
r0rr=r>r?Z	abs_partsZto_drvZto_rootZto_partsZto_abs_partsncf	formattedr#r#r$relative_toqs.	*
zPurePath.relative_tocCs4z|jWStk
r.t|j|_|jYSXdS)zZAn object providing sequence-like access to the
        components in the filesystem path.N)rrrrr/r#r#r$r=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
)r0rr#r#r$joinpathszPurePath.joinpathcCs,z||fWStk
r&tYSXdSr,)r
rrr0keyr#r#r$__truediv__szPurePath.__truediv__cCs2z||g|jWStk
r,tYSXdSr,)rrrrr3r#r#r$__rtruediv__szPurePath.__rtruediv__cCs@|j}|j}|j}t|dkr*|s&|r*|S||||ddS)zThe logical parent of the path.rDNrT)rrrrXr)r0r>r?r=r#r#r$parentszPurePath.parentcCst|S)z*A sequence of this path's logical parents.)rr/r#r#r$parentsszPurePath.parentscCs|js
dS|jjpt|jS)zSTrue if the path is absolute (has both a root and, if applicable,
        a drive).F)rrrboolrr/r#r#r$rszPurePath.is_absolutecCs|j|jS)zaReturn True if the path contains one of the special names reserved
        by the system, if any.)rrrr/r#r#r$rszPurePath.is_reservedc	Cs|jj}||}|j|f\}}}|s0td|rF|||jkrFdS|r\|||jkr\dS|j}|sj|rt|t|kr~dS|dd}nt|t|krdStt	|t	|D]\}}t
||sdSqdS)zE
        Return True if this path matches the given pattern.
        z
empty patternFrDNT)rrErCrrrrrXzipr5rifnmatchcase)	r0Zpath_patternr/r>r?Z	pat_partsr=rAr)r#r#r$rs(zPurePath.matchN)T)T)0rGrHrIrJrrrclassmethodrrrrr
r
rrrrrrpropertyrrrrrr r!rrr?r#rr'r)r*r,r-r1r=r2r5r6r7r8rrrr#r#r#r$rusv

	








	 

	
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.
    r#N)rGrHrIrJ_posix_flavourrrr#r#r#r$rsc@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.
    r#N)rGrHrIrJ_windows_flavourrrr#r#r#r$rsc@seZdZdZdZddZddddZdd	Zd
dZdd
Z	ddZ
deddZdfddZe
ddZe
ddZddZddZddZd d!Zd"d#Zdgd%d&Zd'd(Zd)d*Zd+d,Zdhd/d0Zd1d2Zdid3d4Zd5d6Zdjd7d8Zdkd:d;Zdld<d=Zd>d?Z d@dAZ!dmdBdCZ"dDdEZ#dFdGZ$dHdIZ%dJdKZ&dndLdMZ'dNdOZ(dPdQZ)dRdSZ*dTdUZ+dVdWZ,dXdYZ-dZd[Z.d\d]Z/d^d_Z0d`daZ1dbdcZ2dS)oraPurePath 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)NrFrz$cannot instantiate %r on your system)rrqrrrrrrrrGr
)rrkwargsr0r#r#r$rszPath.__new__NcCs"d|_|dk	r|j|_nt|_dSr)r@r_normal_accessor)r0templater#r#r$r
s
z
Path._initcCs|j|g}||j|j|Sr,)rrrr)r0rAr=r#r#r$r#szPath._make_child_relpathcCs|jr||Sr,)r@
_raise_closedr/r#r#r$	__enter__)szPath.__enter__cCs
d|_dS)NT)r@)r0tvtbr#r#r$__exit__.sz
Path.__exit__cCstddS)NzI/O operation on closed path)rr/r#r#r$rE1szPath._raise_closedcCs|j|||Sr,)rr)r0rflagsrr#r#r$_opener4szPath._openercCs|jr||j|||S)zm
        Open the file pointed by this path and return a file descriptor,
        as os.open() does.
        )r@rErr)r0rLrr#r#r$	_raw_open8szPath._raw_opencCs|tS)zjReturn a new path pointing to the current working directory
        (as returned by os.getcwd()).
        )rqrrrr#r#r$cwdCszPath.cwdcCs||jdS)zrReturn a new path pointing to the user's home directory (as
        returned by os.path.expanduser('~')).
        N)rrrPr#r#r$homeJsz	Path.homecCsB|}z|}Wntk
r2t|}YnXtj||S)zoReturn whether other_path is the same or not as this file
        (as returned by os.path.samefile()).
        )rrrqrusamestat)r0Z
other_pathstZother_str#r#r$samefileQsz
Path.samefileccsH|jr||j|D](}|dkr(q||V|jr|qdS)zyIterate over the files in this directory.  Does not yield any
        result for the special paths '.' and '..'.
        >r3rN)r@rErrrr(r#r#r$iterdir\szPath.iterdirccs`|std||j|f\}}}|s.|r6tdtt||j}||D]
}|VqPdS)zIterate over this subtree and yield all existing files (of any
        kind, including directories) matching the given relative pattern.
        zUnacceptable pattern: {!r}%Non-relative patterns are unsupportedN)rrrrCrrrrr0rnr>r?rselectorrcr#r#r$globjsz	Path.globccsR|j|f\}}}|s|r$tdtdt||j}||D]
}|VqBdS)zRecursively yield all existing files (of any kind, including
        directories) matching the given relative pattern, anywhere in
        this subtree.
        rW)rN)rrCrrrrrXr#r#r$rglobws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.
        FrArD)r@rErrrqrrrr
)r0objr#r#r$absolutesz
Path.absoluteFcCsh|jr||jj||d}|dkr:|t|}|jj|}|j	|fdd}|j
|d|S)z
        Make the path absolute, resolving all symlinks on the way and also
        normalizing it (for example turning slashes into backslashes under
        Windows).
        )rvNFrAr\)r@rErrxrrpr^rnormpathrr
)r0rvrbZnormedr]r#r#r$rxszPath.resolvecCs|j|S)zh
        Return the result of the stat() system call on this path, like
        os.stat() does.
        )rrr/r#r#r$rsz	Path.statcCsddl}||jjS)z:
        Return the login name of the file owner.
        rN)rrrst_uidpw_name)r0rr#r#r$ownersz
Path.ownercCsddl}||jjS)z8
        Return the group name of the file gid.
        rN)grpgetgrgidrst_gidgr_name)r0rcr#r#r$groupsz
Path.grouprrTc	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)r@rEiorrM)r0r	bufferingencodingerrorsnewliner#r#r$rs
z	Path.openc
Cs,|jdd}|W5QRSQRXdS)zK
        Open the file in bytes mode, read it, and close the file.
        rbrNrreadrr#r#r$
read_bytesszPath.read_bytesc
Cs0|jd||d}|W5QRSQRXdS)zJ
        Open the file in text mode, read it, and close the file.
        rhrrlrmNrq)r0rlrmrr#r#r$	read_textszPath.read_textc
Cs6t|}|jdd}||W5QRSQRXdS)zO
        Open the file in bytes mode, write to it, and close the file.
        wbrpN)
memoryviewrwrite)r0dataviewrr#r#r$write_bytesszPath.write_bytesc
CsLt|tstd|jj|jd||d}||W5QRSQRXdS)zN
        Open the file in text mode, write to it, and close the file.
        zdata must be str, not %swrtN)rrprrrGrrx)r0ryrlrmrr#r#r$
write_texts
zPath.write_textTcCsr|jr||r>z|j|dWntk
r8YnXdStjtjB}|sX|tjO}|	||}t
|dS)zS
        Create this file with the given access mode, if it doesn't exist.
        N)r@rErrrrqO_CREATO_WRONLYO_EXCLrOclose)r0rexist_okrLfdr#r#r$touchs
z
Path.touchcCs|jr|z|j||Wndtk
rd|r>|j|kr@|jjddd|j|d|dYn"tk
r|r~|sYnXdS)z<
        Create a new directory at this given path.
        T)r8rFN)r@rErrrtr7rr)r0rr8rr#r#r$rsz
Path.mkdircCs |jr||j||dS)zF
        Change the permissions of the path, like os.chmod().
        N)r@rErrr0rr#r#r$rsz
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)r@rErrrr#r#r$rszPath.lchmodcCs>|jr|z|j|Wntk
r8|s4YnXdS)zd
        Remove this file or link.
        If the path is a directory, use rmdir() instead.
        N)r@rErrrt)r0Z
missing_okr#r#r$r%szPath.unlinkcCs|jr||j|dS)zF
        Remove this directory.  The directory must be empty.
        N)r@rErrr/r#r#r$r2sz
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.
        )r@rErrr/r#r#r$r:sz
Path.lstatcCs&|jr||j||||S)a2
        Rename this path to the target path.

        The target path may be absolute or relative. Relative paths are
        interpreted relative to the current working directory, *not* the
        directory of the Path object.

        Returns the new Path instance pointing to the target path.
        )r@rErrrrr#r#r$rCs
zPath.renamecCs&|jr||j||||S)aS
        Rename this path to the target path, overwriting if that path exists.

        The target path may be absolute or relative. Relative paths are
        interpreted relative to the current working directory, *not* the
        directory of the Path object.

        Returns the new Path instance pointing to the target path.
        )r@rErr6rrr#r#r$r6Rs
zPath.replacecCs"|jr||j|||dS)z
        Make this path a symlink pointing to the target path.
        Note the order of arguments (link, target) is the reverse of os.symlink.
        N)r@rErr)r0rrr#r#r$
symlink_toaszPath.symlink_tocCs |jr||j||dS)aQ
        Make the target path a hard link pointing to this path.

        Note this function does not make this path a hard link to *target*,
        despite the implication of the function and argument names. The order
        of arguments (target, link) is the reverse of Path.symlink_to, but
        matches that of os.link.

        N)r@rErrrr#r#r$rjs
zPath.link_toc
CsXz|WnFtk
r>}zt|s(WYdSd}~XYntk
rRYdSXdS)z+
        Whether this path exists.
        FNT)rrr%rr0rr#r#r$rzszPath.existsc
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)z3
        Whether this path is a directory.
        FN)r	rst_moderr%rrr#r#r$rszPath.is_dirc
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)zq
        Whether this path is a regular file (also True for symlinks pointing
        to regular files).
        FN)rrrrr%rrr#r#r$is_fileszPath.is_filecCsv|r|sdSt|j}z|j}Wntk
rBYdSX|j}||krZdS|j}|j}||kS)z;
        Check if this path is a POSIX mount point
        FT)rrrr7rst_devrst_ino)r0r7Z
parent_devdevZinoZ
parent_inor#r#r$is_mounts



z
Path.is_mountc
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)z7
        Whether this path is a symbolic link.
        FN)r
rrrr%rrr#r#r$rszPath.is_symlinkc
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)z6
        Whether this path is a block device.
        FN)r
rrrr%rrr#r#r$is_block_deviceszPath.is_block_devicec
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)z:
        Whether this path is a character device.
        FN)rrrrr%rrr#r#r$is_char_deviceszPath.is_char_devicec
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)z.
        Whether this path is a FIFO.
        FN)rrrrr%rrr#r#r$is_fifoszPath.is_fifoc
Cs\zt|jWStk
rB}zt|s,WYdSd}~XYntk
rVYdSXdS)z0
        Whether this path is a socket.
        FN)rrrrr%rrr#r#r$	is_socketszPath.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)
        rNrD~)rrrrrr)r0Zhomedirr#r#r$
expanduserszPath.expanduser)N)rK)rN)F)rhrTNNN)NN)NN)rKT)rNFF)F)F)3rGrHrIrJrrr
rrFrJrErMrOr<rQrRrUrVrZr[r^rxrrbrgrrsrur{r}rrrrrrrrr6rrrrrrrrrrrrr#r#r#r$rsj









	



	

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

    On a POSIX system, instantiating a Path should return this object.
    r#N)rGrHrIrJrr#r#r#r$rsc@s,eZdZdZdZddZddZddZd	S)
rzqPath subclass for Windows systems.

    On a Windows system, instantiating a Path should return this object.
    r#cCstddS)Nz*Path.owner() is unsupported on this systemrr/r#r#r$rb(szWindowsPath.ownercCstddS)Nz*Path.group() is unsupported on this systemrr/r#r#r$rg+szWindowsPath.groupcCstddS)Nz-Path.is_mount() is unsupported on this systemrr/r#r#r$r.szWindowsPath.is_mountN)rGrHrIrJrrbrgrr#r#r#r$r!s
)Ari	functoolsrjrrqrrgr:_collections_abcrrrrrrroperatorrrr	r
rrr
rrZurllib.parserrrrrZgetwindowsversionr__all__r r!r%r*r	r+rKrr?r>rrrCrrrrrrrrrrPathLikeregisterrrrrrr#r#r#r$<module>s|$

?&i8
,t



Zerion Mini Shell 1.0