/snap/core20/2866/usr/lib/python3.8/__pycache__
NameSizeModeActions
abc.cpython-38.pyc53340644editdlrm
aifc.cpython-38.pyc254740644editdlrm
antigravity.cpython-38.pyc7970644editdlrm
argparse.cpython-38.pyc625910644editdlrm
ast.cpython-38.pyc167630644editdlrm
asynchat.cpython-38.pyc68510644editdlrm
asyncore.cpython-38.pyc160280644editdlrm
base64.cpython-38.pyc170710644editdlrm
bdb.cpython-38.pyc249210644editdlrm
binhex.cpython-38.pyc121340644editdlrm
bisect.cpython-38.pyc23540644editdlrm
bz2.cpython-38.pyc114450644editdlrm
calendar.cpython-38.pyc270640644editdlrm
cgi.cpython-38.pyc265440644editdlrm
cgitb.cpython-38.pyc101500644editdlrm
chunk.cpython-38.pyc48390644editdlrm
cmd.cpython-38.pyc126260644editdlrm
code.cpython-38.pyc99130644editdlrm
codecs.cpython-38.pyc339560644editdlrm
codeop.cpython-38.pyc64170644editdlrm
colorsys.cpython-38.pyc32400644editdlrm
compileall.cpython-38.pyc94100644editdlrm
configparser.cpython-38.pyc457180644editdlrm
contextlib.cpython-38.pyc202290644editdlrm
contextvars.cpython-38.pyc2430644editdlrm
copy.cpython-38.pyc69870644editdlrm
copyreg.cpython-38.pyc43180644editdlrm
cProfile.cpython-38.pyc54800644editdlrm
crypt.cpython-38.pyc33870644editdlrm
csv.cpython-38.pyc119100644editdlrm
dataclasses.cpython-38.pyc236530644editdlrm
datetime.cpython-38.pyc571730644editdlrm
decimal.cpython-38.pyc3590644editdlrm
difflib.cpython-38.pyc594380644editdlrm
dis.cpython-38.pyc158080644editdlrm
doctest.cpython-38.pyc759740644editdlrm
dummy_threading.cpython-38.pyc11100644editdlrm
enum.cpython-38.pyc259620644editdlrm
filecmp.cpython-38.pyc84270644editdlrm
fileinput.cpython-38.pyc133730644editdlrm
fnmatch.cpython-38.pyc33550644editdlrm
formatter.cpython-38.pyc175450644editdlrm
fractions.cpython-38.pyc187390644editdlrm
ftplib.cpython-38.pyc280070644editdlrm
functools.cpython-38.pyc279010644editdlrm
genericpath.cpython-38.pyc40010644editdlrm
getopt.cpython-38.pyc62710644editdlrm
getpass.cpython-38.pyc41780644editdlrm
gettext.cpython-38.pyc180000644editdlrm
glob.cpython-38.pyc43430644editdlrm
gzip.cpython-38.pyc181840644editdlrm
hashlib.cpython-38.pyc67270644editdlrm
heapq.cpython-38.pyc140700644editdlrm
hmac.cpython-38.pyc63880644editdlrm
imaplib.cpython-38.pyc413420644editdlrm
imghdr.cpython-38.pyc41180644editdlrm
imp.cpython-38.pyc98090644editdlrm
inspect.cpython-38.pyc805930644editdlrm
io.cpython-38.pyc34540644editdlrm
ipaddress.cpython-38.pyc628290644editdlrm
keyword.cpython-38.pyc9980644editdlrm
linecache.cpython-38.pyc38670644editdlrm
locale.cpython-38.pyc346740644editdlrm
lzma.cpython-38.pyc120180644editdlrm
mailbox.cpython-38.pyc602640644editdlrm
mailcap.cpython-38.pyc72060644editdlrm
mimetypes.cpython-38.pyc160310644editdlrm
modulefinder.cpython-38.pyc161150644editdlrm
netrc.cpython-38.pyc37770644editdlrm
nntplib.cpython-38.pyc339740644editdlrm
ntpath.cpython-38.pyc140910644editdlrm
nturl2path.cpython-38.pyc17440644editdlrm
numbers.cpython-38.pyc122020644editdlrm
opcode.cpython-38.pyc54200644editdlrm
operator.cpython-38.pyc136910644editdlrm
optparse.cpython-38.pyc480570644editdlrm
os.cpython-38.pyc313970644editdlrm
pathlib.cpython-38.pyc442090644editdlrm
pdb.cpython-38.pyc472260644editdlrm
pickle.cpython-38.pyc469080644editdlrm
pickletools.cpython-38.pyc672040644editdlrm
pipes.cpython-38.pyc77950644editdlrm
pkgutil.cpython-38.pyc163090644editdlrm
platform.cpython-38.pyc243260644editdlrm
plistlib.cpython-38.pyc273740644editdlrm
poplib.cpython-38.pyc134590644editdlrm
posixpath.cpython-38.pyc104610644editdlrm
pprint.cpython-38.pyc162810644editdlrm
profile.cpython-38.pyc147580644editdlrm
pstats.cpython-38.pyc220660644editdlrm
pty.cpython-38.pyc39550644editdlrm
pyclbr.cpython-38.pyc104510644editdlrm
pydoc.cpython-38.pyc836460644editdlrm
py_compile.cpython-38.pyc73520644editdlrm
queue.cpython-38.pyc106260644editdlrm
quopri.cpython-38.pyc57480644editdlrm
random.cpython-38.pyc201080644editdlrm
re.cpython-38.pyc144220644editdlrm
reprlib.cpython-38.pyc53030644editdlrm
rlcompleter.cpython-38.pyc57550644editdlrm
runpy.cpython-38.pyc81810644editdlrm
sched.cpython-38.pyc65320644editdlrm
secrets.cpython-38.pyc21900644editdlrm
selectors.cpython-38.pyc169350644editdlrm
shelve.cpython-38.pyc94900644editdlrm
shlex.cpython-38.pyc75360644editdlrm
shutil.cpython-38.pyc372190644editdlrm
signal.cpython-38.pyc28430644editdlrm
site.cpython-38.pyc171680644editdlrm
sitecustomize.cpython-38.pyc2200644editdlrm
smtpd.cpython-38.pyc264630644editdlrm
smtplib.cpython-38.pyc355320644editdlrm
sndhdr.cpython-38.pyc69890644editdlrm
socket.cpython-38.pyc277870644editdlrm
socketserver.cpython-38.pyc253610644editdlrm
sre_compile.cpython-38.pyc151420644editdlrm
sre_constants.cpython-38.pyc63590644editdlrm
sre_parse.cpython-38.pyc216470644editdlrm
ssl.cpython-38.pyc450370644editdlrm
stat.cpython-38.pyc43720644editdlrm
statistics.cpython-38.pyc336530644editdlrm
string.cpython-38.pyc73000644editdlrm
stringprep.cpython-38.pyc110170644editdlrm
struct.cpython-38.pyc3300644editdlrm
subprocess.cpython-38.pyc419670644editdlrm
sunau.cpython-38.pyc170800644editdlrm
symbol.cpython-38.pyc24040644editdlrm
symtable.cpython-38.pyc113220644editdlrm
sysconfig.cpython-38.pyc158370644editdlrm
tabnanny.cpython-38.pyc70300644editdlrm
tarfile.cpython-38.pyc630430644editdlrm
telnetlib.cpython-38.pyc182370644editdlrm
tempfile.cpython-38.pyc266530644editdlrm
textwrap.cpython-38.pyc135190644editdlrm
this.cpython-38.pyc12610644editdlrm
threading.cpython-38.pyc399760644editdlrm
timeit.cpython-38.pyc117770644editdlrm
token.cpython-38.pyc24850644editdlrm
tokenize.cpython-38.pyc171600644editdlrm
trace.cpython-38.pyc200260644editdlrm
traceback.cpython-38.pyc199380644editdlrm
tracemalloc.cpython-38.pyc173630644editdlrm
tty.cpython-38.pyc10760644editdlrm
turtle.cpython-38.pyc1300220644editdlrm
types.cpython-38.pyc91770644editdlrm
typing.cpython-38.pyc624200644editdlrm
uu.cpython-38.pyc36050644editdlrm
uuid.cpython-38.pyc236830644editdlrm
warnings.cpython-38.pyc136520644editdlrm
wave.cpython-38.pyc181490644editdlrm
weakref.cpython-38.pyc195180644editdlrm
webbrowser.cpython-38.pyc171200644editdlrm
xdrlib.cpython-38.pyc82210644editdlrm
zipapp.cpython-38.pyc58540644editdlrm
zipfile.cpython-38.pyc593360644editdlrm
zipimport.cpython-38.pyc172750644editdlrm
_bootlocale.cpython-38.pyc12430644editdlrm
_collections_abc.cpython-38.pyc287410644editdlrm
_compat_pickle.cpython-38.pyc55010644editdlrm
_compression.cpython-38.pyc41460644editdlrm
_dummy_thread.cpython-38.pyc60370644editdlrm
_markupbase.cpython-38.pyc77900644editdlrm
_osx_support.cpython-38.pyc115930644editdlrm
_pydecimal.cpython-38.pyc1607350644editdlrm
_pyio.cpython-38.pyc740790644editdlrm
_py_abc.cpython-38.pyc46700644editdlrm
_sitebuiltins.cpython-38.pyc34810644editdlrm
_strptime.cpython-38.pyc160440644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-38.pyc211210644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-38.pyc211150644editdlrm
_threading_local.cpython-38.pyc64460644editdlrm
_weakrefset.cpython-38.pyc76000644editdlrm
__future__.cpython-38.pyc41580644editdlrm
__phello__.foo.cpython-38.pyc1270644editdlrm
Edit: /snap/core20/2866/usr/lib/python3.8/__pycache__/pathlib.cpython-38.pyc (44209B)
U ʦi@sjddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z m Z m Z mZmZddlmZddlmZmZmZmZmZmZmZddlmZdZejdkrddlZe dd d krdd lm!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:;e9Gd2dde9ZGd5dde>e<Z?Gd6dde>e=Z@dS)7N)Sequence)EINVALENOENTENOTDIREBADFELOOP) attrgetter)S_ISDIRS_ISLNKS_ISREGS_ISSOCKS_ISBLKS_ISCHRS_ISFIFO)quote_from_bytesTnt)r)_getfinalpathnameFPurePath PurePosixPathPureWindowsPathPath PosixPath WindowsPath){icCs t|ddtkpt|ddtkS)NerrnoZwinerror)getattr_IGNORED_ERROS_IGNORED_WINERRORS)Z exceptionr!/usr/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__c Csg}|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) r.partsZparsedr+r2drvrootitpartZrelxr!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)r.r<r=r;Zdrv2Zroot2Zparts2r!r!r"join_parsed_partsfsz_Flavour.join_parsed_partsN)__name__ __module__ __qualname____doc__r/rArDr!r!r!r"r)9s&r)c@seZdZdZdZdZeZej dkZ e dZ dZ ddd d hd d ed dDBdd ed dDBZefddZddZddZddZd&ddZe fddZddZdd Zd!d"Zd#d$Zd%S)'_WindowsFlavour\/TrZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZz\\?\ZCONZPRNZAUXZNULcCsh|] }d|qS)zCOM%dr!.0ir!r!r" sz_WindowsFlavour.rB cCsh|] }d|qS)zLPT%dr!rLr!r!r"rOsc Cs\|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)NrrBrr0:)_split_extended_pathfindlen drive_letterslstrip) r.r?r+firstsecondprefixZthirdindexZindex2r<r=r!r!r"r5s6      "    z_WindowsFlavour.splitrootcCs|Sr*lowerr.sr!r!r"rCsz_WindowsFlavour.casefoldcCsdd|DS)NcSsg|] }|qSr!r])rMpr!r!r" sz2_WindowsFlavour.casefold_parts..r!r.r;r!r!r"casefold_partssz_WindowsFlavour.casefold_partscCstt|tjjSr*)recompilefnmatch translate IGNORECASE fullmatchr.patternr!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_normalFileNotFoundErrorpathr6r7r,r3)r.rsstrictr`Z previous_sZ tail_partstailr!r!r"resolves$ z_WindowsFlavour.resolvecCsXd}||rP|dd}|dd}|drP||dd7}d|dd}||fS)Nr0zUNC\rQrJ) startswith)r.r`Z ext_prefixr[r!r!r"rTs    z$_WindowsFlavour._split_extended_pathcCs||dSNrB)rTr_r!r!r"rqsz_WindowsFlavour._ext_to_normalcCs6|sdS|ddrdS|ddd|jkS)NFrz\\rRr1)rx partitionupperreserved_namesrcr!r!r" is_reserveds z_WindowsFlavour.is_reservedcCsd|j}t|dkrJ|ddkrJ|ddd}d|t|dfSdt|dSdS)NrrBrSrKz file:///%s/%szutf-8zfile:)driverVas_posixrXurlquote_from_bytesencode)r.rsr~restr!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) NZ USERPROFILEZHOMEPATHZ HOMEDRIVEr0zCan't determine home directoryZUSERNAMErR%Can't determine home directory for %rrB)roenvironKeyError RuntimeErrorrAr,)r.usernameuserhomer<r=r;r!r!r" gethomedirs*     z_WindowsFlavour.gethomedirN)F)rErFrGr+r2has_drvntpathpathmodroname is_supportedsetrWZext_namespace_prefixranger|r5rCrdrmrvrTrqr}rrr!r!r!r"rIxs.   '    rIc@sleZdZdZdZdZeZej dkZ efddZ ddZ d d Z d d Zdd dZddZddZddZdS) _PosixFlavourrKr0FrcCsV|rH|d|krH||}t|t|dkr._resolver0)r+ _accessor is_absoluterorprn)r.rsrtbaser!rr"rv=s )z_PosixFlavour.resolvecCsdSNFr!rcr!r!r"r}msz_PosixFlavour.is_reservedcCst|}dt|S)Nzfile://)bytesr)r.rsZbpathr!r!r"rpsz_PosixFlavour.make_uricCs||s@z tjdWStk r<ddl}|tjYSXn8ddl}z||jWStk rvtd|YnXdS)NHOMErr) rorrpwdgetpwuidgetuidpw_dirgetpwnamr)r.rrr!r!r"rvs z_PosixFlavour.gethomedirN)F)rErFrGr+r2r posixpathrrorrr5rCrdrmrvr}rrr!r!r!r"rs   0rc@seZdZdZdS) _AccessorzjAn accessor implements a particular (system-specific or not) way of accessing paths on the filesystem.N)rErFrGrHr!r!r!r"rsrc@seZdZejZejZejZejZejZej Z e edr>ej Z nddZ ej Z ej Z e edrdejZn eddZejZejZejZererejZqddZn ed dZejZd d Zd S) _NormalAccessorlchmodcCs tddS)Nz%lchmod() not available on this systemNotImplementedError)r.Zpathobjmoder!r!r"rsz_NormalAccessor.lchmodlinkcCs tddS)Nz&os.link() not available on this systemrr.rr!r!r"link_tosz_NormalAccessor.link_tocCs tddS)Nz&symlink() not available on this systemrabtarget_is_directoryr!r!r"symlinksz_NormalAccessor.symlinkcCs t||Sr*)rorrr!r!r"rscCs t|Sr*)rorr.rsr!r!r"rsz_NormalAccessor.readlinkN)rErFrGrostatlstatopenlistdirscandirchmodhasattrrmkdirunlinkrr staticmethodrmdirrenamer4rsupports_symlinksrutimerr!r!r!r"rs4     rcCsR|d}|dd}|dkr"t}n$d|kr4tdnt|rBt}nt}||||S)NrrB**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)r.rrr!r!r"r/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_direxistsrriter _select_from)r. parent_pathZpath_clsrrrr!r!r" select_fromsz_Selector.select_fromN)rErFrGrHr/rr!r!r!r"rs rc@seZdZddZdS)rccs |VdSr*r!)r.rrrrr!r!r"rsz!_TerminatingSelector._select_fromN)rErFrGrr!r!r!r"rsrc@seZdZddZddZdS)rcCs||_t|||dSr*)rrr/)r.rrrr!r!r"r/sz_PreciseSelector.__init__ccs\z@||j}|jr|n||r>|j||||D] }|Vq2Wntk rVYdSXdSr*)_make_child_relpathrrrrPermissionError)r.rrrrrsrar!r!r"rs  z_PreciseSelector._select_fromNrErFrGr/rr!r!r!r"rsrc@seZdZddZddZdS)rcCs|||_t|||dSr*)rmmatchrr/r.r'rrr!r!r"r/s 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) r.rrrr scandir_itentriesentryrrrsrar!r!r"rs&   z_WildcardSelector._select_fromNrr!r!r!r"rsrc@s$eZdZddZddZddZdS)rcCst|||dSr*)rr/rr!r!r"r//sz#_RecursiveWildcardSelector.__init__c cs|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) r.rrrrrrZ entry_is_dirrrsrar!r!r"r2s"    z/_RecursiveWildcardSelector._iterate_directoriesc cs~zbt}zL|jj}||||D]0}|||||D]}||kr2|V||q2q W5|XWntk rxYdSXdSr*)rclearrrraddr) r.rrrrZyieldedZsuccessor_selectZstarting_pointrar!r!r"rEsz'_RecursiveWildcardSelector._select_fromN)rErFrGr/rrr!r!r!r"r-src@s4eZdZdZdZddZddZddZd d Zd S) _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"r/^s z_PathParents.__init__cCs(|js |jrt|jdSt|jSdSry)rrrVrr-r!r!r"__len__es z_PathParents.__len__cCs@|dks|t|krt||j|j|j|jd| dS)NrrB)rV IndexErrorr_from_parsed_partsrrr)r.idxr!r!r" __getitem__ks z_PathParents.__getitem__cCsd|jjS)Nz <{}.parents>)formatrrEr-r!r!r"__repr__qsz_PathParents.__repr__N) rErFrGrH __slots__r/rrrr!r!r!r"rYs rc@seZdZdZdZddZddZeddZedVd d Z edWd d Z eddZ ddZ 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)rrorrr _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) isinstancerrrofspathrnr7 TypeErrorr_flavourrA)rrr;rr!r!r" _parse_argss    zPurePath._parse_argsTcCs<t|}||\}}}||_||_||_|r8||Sr*)objectrrrrr_init)rrinitr.r<r=r;r!r!r"rs zPurePath._from_partscCs,t|}||_||_||_|r(||Sr*)rrrrrr)rr<r=r;r r.r!r!r"rs zPurePath._from_parsed_partscCs4|s|r$|||j|ddS|j|SdSry)rr,)rr<r=r;r!r!r"_format_parsed_partsszPurePath._format_parsed_partscCsdSr*r!r-r!r!r"rszPurePath._initcCs@||\}}}|j|j|j|j|||\}}}||||Sr*)rrrDrrrr)r.rr<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.r1N)rAttributeErrorr rrrr-r!r!r"__str__s zPurePath.__str__cCst|Sr*)rnr-r!r!r" __fspath__szPurePath.__fspath__cCs|j}t||jdS)zNReturn the string representation of the path with forward (/) slashes.rK)rrnr4r+r.fr!r!r"rszPurePath.as_posixcCs t|S)zaReturn the bytes representation of the path. This is only recommended to use under Unix.)rofsencoder-r!r!r" __bytes__szPurePath.__bytes__cCsd|jj|S)Nz{}({!r}))rrrErr-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*)rr rrdrr-r!r!r"_cpartss zPurePath._cpartscCs&t|tstS|j|jko$|j|jkSr*)rrNotImplementedrrr.otherr!r!r"__eq__s zPurePath.__eq__cCs8z|jWStk r2tt|j|_|jYSXdSr*)rr hashrrr-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)r.anchorr!r!r"r!s zPurePath.anchorcCs.|j}t||js|jrdndkr&dS|dS)z!The final path component, if any.rBrr0rR)rrVrrrcr!r!r"r$sz PurePath.namecCsD|j}|d}d|kr,t|dkr.rBN)rrrXr6r.rr!r!r"suffixes:s   zPurePath.suffixescCsD|j}|d}d|kr,t|dkrd?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)NrFr z$cannot instantiate %r on your system) rrorrrrrrrrEr)rrkwargsr.r!r!r"rsz Path.__new__NcCs"d|_|dk r|j|_nt|_dSr)r<r_normal_accessor)r.templater!r!r"rs z Path._initcCs|j|g}||j|j|Sr*)rrrr)r.r?r;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<)r.tvtbr!r!r"__exit__.sz Path.__exit__cCs tddS)NzI/O operation on closed path)rr-r!r!r"rA1szPath._raise_closedcCs|j|||Sr*)rr)r.rflagsrr!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<rArr)r.rHrr!r!r" _raw_open8szPath._raw_opencCs |tS)zjReturn a new path pointing to the current working directory (as returned by os.getcwd()). )rorprr!r!r"cwdCszPath.cwdcCs||jdS)zrReturn a new path pointing to the user's home directory (as returned by os.path.expanduser('~')). N)rrrLr!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()). )rr rorssamestat)r.Z 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 '..'. >r1rN)r<rArrrr&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)rrrrArrrrr.rlr<r=rZselectorrar!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. rS)rN)rrArrrrrTr!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. Fr=r@)r<rArrrorprr)r.objr!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). )rtNFr=rW) r<rArrvrrnrYrnormpathrr)r.rtr`ZnormedrXr!r!r"rvs  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_uidZpw_name)r.rr!r!r"ownersz Path.ownercCsddl}||jjS)z8 Return the group name of the file gid. rN)grpZgetgrgidrst_gidZgr_name)r.r]r!r!r"groupsz Path.grouprrRc Cs(|jr|tj|||||||jdS)z| Open the file pointed by this path and return a file object, as the built-in open() function does. )Zopener)r<rAiorrI)r.r 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. r`rrcrdNrh)r.rcrdrr!r!r" read_textszPath.read_textc Cs6t|}|jdd}||W5QRSQRXdS)zO Open the file in bytes mode, write to it, and close the file. wbrgN) memoryviewrwrite)r.dataZviewrr!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 %swrkN)rrnrrrErro)r.rprcrdrr!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<rArrrroO_CREATO_WRONLYO_EXCLrKclose)r.rexist_okrHfdr!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)r5rxFN)r<rArrrrr4rr)r.rr5rxr!r!r"rs z Path.mkdircCs |jr||j||dS)zF Change the permissions of the path, like os.chmod(). N)r<rArrr.rr!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<rArrr{r!r!r"rsz Path.lchmodcCs>|jr|z|j|Wntk r8|s4YnXdS)zd Remove this file or link. If the path is a directory, use rmdir() instead. N)r<rArrrr)r.Z missing_okr!r!r"r%sz Path.unlinkcCs|jr||j|dS)zF Remove this directory. The directory must be empty. N)r<rArrr-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<rArrr-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<rArrrrr!r!r"rCs z Path.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<rArr4rrr!r!r"r4Rs 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<rArr)r.rrr!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<rArrrr!r!r"rjs z Path.link_toc CsXz |WnFtk r>}zt|s(WYdSd}~XYntk rRYdSXdS)z+ Whether this path exists. FNT)rrr#rr.rr!r!r"rzs z Path.existsc Cs\zt|jWStk rB}zt|s,WYdSd}~XYntk rVYdSXdS)z3 Whether this path is a directory. FN)r rst_moderr#rr}r!r!r"rsz Path.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)r rr~rr#rr}r!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)rrrr4rst_devrst_ino)r.r4Z parent_devZdevZinoZ 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 rr~rr#rr}r!r!r"rszPath.is_symlinkc Cs\zt|jWStk rB}zt|s,WYdSd}~XYntk rVYdSXdS)z6 Whether this path is a block device. FN)r rr~rr#rr}r!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)rrr~rr#rr}r!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)rrr~rr#rr}r!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 rr~rr#rr}r!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) rNrB~)rrrrrr)r.Zhomedirr!r!r" expandusers zPath.expanduser)N)rG)rJ)F)r`rRNNN)NN)NN)rGT)rJFF)F)F)3rErFrGrHrrrrrBrFrArIrKr8rMrNrQrRrUrVrYrvrr\r_rrjrlrqrsrzrrrrrrrr4r|rrrrrrrrrrrr!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)rErFrGrHrr!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"r\(szWindowsPath.ownercCs tddS)Nz*Path.group() is unsupported on this systemrr-r!r!r"r_+szWindowsPath.groupcCs tddS)Nz-Path.is_mount() is unsupported on this systemrr-r!r!r"r.szWindowsPath.is_mountN)rErFrGrHrr\r_rr!r!r!r"r!s )Arg functoolsrarrorrer8_collections_abcrrrrrrroperatorrrr r r r r rrZ urllib.parserrrrrZgetwindowsversionr__all__rr r#r(rr)rIrr;r:rrr?rrrrrrrrrrPathLikeregisterrrrrrr!r!r!r"s|  $   ?&i8  ,t