QfdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z mZmZmZddlmZmZmZmZmZmZmZddlmZgdZehdd Dchc]}d | c}zd Dchc]}d | c}zZd Zd Z dZ!e eeefZ"ee e!fZ#dZ$ejJdZ&ejNdjQd\Z)Z*e+e,e)e,e* Z-e.j_ddde.j_ddddZ0ejbdZ2ejbddZ3ejbdZ4GddZ5Gdd Z6Gd!d"e5Z7Gd#d$e5Z8Gd%d&e5Z9Gd'd(e9Z:Gd)d*e Z;Gd+d,e<Z=ej|je=Gd-d.e=Z@Gd/d0e=ZAGd1d2e=ZBGd3d4eBe@ZCGd5d6eBeAZDycc}wcc}w)7zObject-oriented filesystem paths. This module provides classes to represent abstract paths and concrete paths with operations that have semantics appropriate for different operating systems. N)Sequence)ENOENTENOTDIREBADFELOOP)S_ISDIRS_ISLNKS_ISREGS_ISSOCKS_ISBLKS_ISCHRS_ISFIFO)quote_from_bytes)PurePath PurePosixPathPureWindowsPathPath PosixPath WindowsPath>CONIN$CONOUT$AUXCONNULPRNu123456789¹²³COMLPT{icRt|ddtvxst|ddtvS)Nerrnowinerror)getattr_IGNORED_ERRNOS_IGNORED_WINERRORS) exceptions ./opt/alt/python312/lib64/python3.12/pathlib.py _ignore_errorr(4s1 Iw - @ G Iz4 04F FHc*|jddk(S)NAa)normcase)flavours r'_is_case_sensitiver.9s   D !T ))r)_ /)r1r0\)r2r0)r1r2c&|d}|s tS|dk(rKd}|t|kr$||dk(r|dz }|t|kr ||dk(r||d}d|vrt}n-t}n&|dd}|dk(rt}nd|vr t dt }|||||S)Nr**..z:Invalid pattern: '**' can only be an entire path component)_TerminatingSelectorlen _DoubleRecursiveWildcardSelector_RecursiveWildcardSelector_ParentSelector ValueError_WildcardSelector) pattern_partsr-case_sensitivepatchild_parts_idx child_partsclss r'_make_selectorrDQs  C #%% d{M 22}_7UY]7] q OM 22}_7UY]7]#O$45 ; 2C,C#AB' $;!C S[YZ Z#C sK. 99r))maxsizec|rtjntj}tjt j ||j SN)reNOFLAG IGNORECASEcompilefnmatch translatematch)r@r?flagss r'_compile_patternrQjs5'BIIR]]E ::g'',e 4 : ::r)chdg}|jdD]?}|dk(rd}n$|dk(rd}ntj|t}|j |A|j dt j }|s|t jz}t jd j|| S) aYCompile the given pattern lines to an `re.Pattern` object. The *pattern_lines* argument is a glob-style pattern (e.g. '*/*.py') with its path separators and newlines swapped (e.g. '* *.py`). By using newlines to separate path components, and not setting `re.DOTALL`, we ensure that the `*` wildcard cannot match path separators. The returned `re.Pattern` object may have its `match()` method called to match a complete pattern, or `search()` to match from the right. The argument supplied to these methods must also have its path separators and newlines swapped. ^T)keependsz* z.+\n*z.+z\Z)rP) splitlinesrMrN_FNMATCH_SLICEappendrI MULTILINErKrLjoin) pattern_linesr?partspartrPs r'_compile_pattern_linesr_ps EE(($(7 5=D S[D$$T*>:D T8 LL LLE   ::bggenE 22r)ceZdZdZdZdZy) _SelectorzYA selector matches a specific glob pattern part against the children of a given path.cv||_|rt||||_d|_yt |_d|_y)NTF)rBrD successordironlyr7)selfrBr-r?s r'__init__z_Selector.__init__s5& +K.QDNDL13DN DLr)ct|}|j}|js tgS|j ||S)zuIterate over all child paths of `parent_path` matched by this selector. This can contain parent_path itself.)type_scandiris_diriter _select_from)re parent_pathpath_clsscandirs r' select_fromz_Selector.select_fromsA $##!!#8O  g66r)N)__name__ __module__ __qualname____doc__rfrpr)r'raras!7r)raceZdZdZy)r7c#K|ywrHru)rermros r'rlz!_TerminatingSelector._select_froms sN)rqrrrsrlrur)r'r7r7sr)r7ceZdZdZdZy)r;c4tj||||yrHrarf)renamerBr-r?s r'rfz_ParentSelector.__init__4g~Fr)c#xK|jd}|jj||D]}|yw)Nr6)_make_child_relpathrcrl)rermropathps r'rlz_ParentSelector._select_froms6..t4,,T7;AG: r)c#K ||5}t|}dddD]u}|jr |js! |j}|j |s@|j |}|jj||D]}|wy#1swYxYw#t$rYwxYw#t$rYywxYwwrH) listrdrjOSErrorr{rOr~rcrl) rermro scandir_itentriesentryr{rrs r'rlz_WildcardSelector._select_froms %z*& !<<!$||~$ .zz::d#&::4@D!^^88wGH! &%#! !   sfCB6 BB6CB'C"9CB$ B6' B30C2B33C6 C?CCCNrrur)r'r=r=s ; r)r=ceZdZdZdZdZy)r:c4tj||||yrHrzrs r'rfz#_RecursiveWildcardSelector.__init__r|r)c#zK||jD] \}}}|D]}|j|"ywrH)walkr~)rermdirpathdirnamesr/dirnames r'_iterate_directoriesz/_RecursiveWildcardSelector._iterate_directoriessA$/$4$4$6 GXq#11'::$%7s9;c#K|jj}|j|D]}|||D]}|ywrH)rcrlr)rermrosuccessor_selectstarting_pointrs r'rlz'_RecursiveWildcardSelector._select_fromsB>>66"77 DN%ng>?EsAAN)rqrrrsrfrrlrur)r'r:r:sG; r)r:c"eZdZdZfdZxZS)r9z Like _RecursiveWildcardSelector, but also de-duplicates results from successive selectors. This is necessary if the pattern contains multiple non-adjacent '**' segments. c#Kt} t| ||D]}||vs||j| |j y#|j wxYwwrH)setsuperrladdclear)rermroyieldedr __class__s r'rlz-_DoubleRecursiveWildcardSelector._select_fromsV% W)+w?G#GKKN@ MMOGMMOs A%AAA%A""A%)rqrrrsrtrl __classcell__rs@r'r9r9s r)r9c,eZdZdZdZdZdZdZdZy) _PathParentszvThis object provides sequence-like access to the logical ancestors of a path. Don't try to construct it yourself.)_path_drv_root_tailcx||_|j|_|j|_|j |_yrH)rdriverrootrrrers r'rfz_PathParents.__init__ s* JJ YY ZZ r)c,t|jSrH)r8rres r'__len__z_PathParents.__len__s4::r)c t|tr2tfdt|j t DS|t k\s|t  kr t ||dkr|t z }jjjjjd| dz S)Nc3(K|] }| ywrHru).0ires r' z+_PathParents.__getitem__..sI*HQa*Hsrr5) isinstanceslicetuplerangeindicesr8 IndexErrorr_from_parsed_partsrrr)reidxs` r' __getitem__z_PathParents.__getitem__s c5 !I%SY1G*HII I #d) sc$iZ/S/ ! 7 3t9 Czz,,TYY -1ZZ #-BD Dr)c^djt|jjS)Nz <{}.parents>)formatrhrrqrs r'__repr__z_PathParents.__repr__ s"$$T$**%5%>%>??r)N) rqrrrsrt __slots__rfrrrrur)r'rrs"73I  D@r)rceZdZdZdZej ZdZdZ dZ dZ e dZ dZd Ze d Zd Zd Zd ZdZdZdZedZedZedZdZdZdZdZdZdZ edZ!edZ"edZ#edZ$edZ%edZ&ed Z'ed!Z(d"Z)d#Z*d$Z+d%d&d'Z,d(Z-ed)Z.d*Z/d+Z0d,Z1ed-Z2ed.Z3d/Z4d0Z5d1d2d3Z6y1)4ra|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. ) _raw_pathsrr _tail_cached_str_str_normcase_cached_parts_normcase_cached _lines_cached_hashcz|turtjdk(rtnt}t j |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. nt)rosr{rrobject__new__rCargskwargss r'rzPurePath.__new__Ws+ (?%'WW_/-C~~c""r)c2|j|jfSrH)rr]rs r' __reduce__zPurePath.__reduce__as ++r)cg}|D]}t|trc|jtur5|jtur#|j d|j DZ|j |j v tj|}t|ts!tdt|j|j|||_y#t$r|}YYwxYw)Nc3@K|]}|jddyw)r2r1N)replace)rrs r'rz$PurePath.__init__..ls T^TdC!8^szVargument should be a str or an os.PathLike object where __fspath__ returns a str, not )rr_flavourntpath posixpathextendrrfspath TypeErrorstrrhrqrY)rerpathsargrs r'rfzPurePath.__init__fsC#x(<<6)dmmy.HLL TS^^ TTLL099S>D"$,##Dz225788 T"#$ !Ds<C C+*C+ct||S)zConstruct a new path object from any number of path-like objects. Subclasses may override this method to customize how new path objects are created from methods like `iterdir()`. )rhre pathsegmentss r' with_segmentszPurePath.with_segments|s tDz<((r)c"|sddgfS|jj}|jj}|r|j||}|jj |\}}}|s[|j |rJ|j |s9|j|}t|dk(r |ddvr|}nt|dk(r|}|j|Dcgc])}|s|dk7s tjt|+} }||| fScc}w)NrVz?..) rsepaltsepr splitroot startswithendswithsplitr8sysinternr) rCrrrdrvrrel drv_partsxparseds r' _parse_pathzPurePath._parse_pathsr2: ll$$ <<,D//5T3s+CLL4E #I9~"y|4'?Y1$.1iinOna3h#**SV$nOD&  PsD D % D c|j}t|dk(rd}n-t|dk(r|d}n|jj|}|j |\}}}||_||_||_y)NrrVr5)rr8rr[rrrr)rerrrrtails r' _load_partszPurePath._load_partssq u:?D Z1_8D%4==%%u-D**40T4   r)c|j|||}|j|}|xsd|_||_||_||_|SNr)_format_parsed_partsrrrrr)rerrrpath_strrs r'rzPurePath._from_parsed_partssL,,S$=!!(+O     r)c|s|r+||z|jjj|zS|r'|jj|ddrdg|z}|jjj|S)Nrr)rrr[ splitdrive)rCrrrs r'rzPurePath._format_parsed_partssn $: 0 0 5 5d ;; ; cll--d1g6q954EAD I99  s AA A ct|SrH)rrs r' __fspath__zPurePath.__fspath__s 4yr)cd|j}t|j|jdS)zNReturn the string representation of the path with forward (/) slashes.r1)rrrrrefs r'as_posixzPurePath.as_posixs( MM4y  ,,r)c,tj|S)zaReturn the bytes representation of the path. This is only recommended to use under Unix.)rfsencoders r' __bytes__zPurePath.__bytes__s{{4  r)cjdj|jj|jS)Nz{}({!r}))rrrqrrs r'rzPurePath.__repr__s%  !8!8$--/JJr)c4|js td|j}t|dk(r!|ddk(rd|z}|j dd}n"|rd}|j }n d}t |}|t tj|zS) z Return the path as a 'file' URI.z.relative path can't be expressed as a file URIrr5:zfile:///Nzfile:zfile://) is_absoluter<rr8rrurlquote_from_bytesrr)rerprefixrs r'as_urizPurePath.as_uris!MN N  u:?uQx3%'F==?12&D F==?DFt9D+BKK,=>>>r)c |jS#t$rSt|jrt ||_nt |j |_|jcYSwxYwrH)rrr.rrlowerrs r' _str_normcasezPurePath._str_normcasesY -,, , -!$--0,/I),/IOO,=),, ,  -s AA*)A*c |jS#t$rC|jj|jj |_|jcYSwxYwrH)rrrrrrrs r'_parts_normcasezPurePath._parts_normcasesQ /.. . /*.*<*<*B*B4==CTCT*UD '.. . /s A AAc |jS#t$rZt|}|dk(rd|_n3t|jj }|j ||_|jcYSwxYw)NrrV)rrr_SWAP_SEP_AND_NEWLINErrrN)rertranss r'_lineszPurePath._linessm &%% % &4yH3%'"-dmm.?.?@%-%7%7%>"%% % &s A A10A1ct|tstS|j|jk(xr|j|juSrH)rrNotImplementedrrreothers r'__eq__zPurePath.__eq__s;%*! !!!U%8%88\T]]enn=\\r)c |jS#t$r)t|j|_|jcYSwxYwrH)rrhashrrs r'__hash__zPurePath.__hash__ s< ::  d001DJ::  s /AAct|tr|j|jurtS|j|jkSrHrrrrrrs r'__lt__zPurePath.__lt__8%*dmm5>>.Q! !##e&;&;;;r)ct|tr|j|jurtS|j|jkSrHr"rs r'__le__zPurePath.__le__8%*dmm5>>.Q! !##u'<'<<?+>f +>???s Ac|j}|jd}d|cxkrt|dz kr n|S|d|S|S)z0The final path component, minus its last suffix.rrr5Nr5r7s r'stemz PurePath.stemjsHyy JJsO q 3t9q= K8OKr)c8|jst|d|j}|r-|j|vs|jr|j|vs|dk(rtd|z|j |j |j|jdd|gzS)z-Return a new path with the file name changed. has an empty namerzInvalid name %rNr3) r{r<rrrrrrr)rer{rs r' with_namezPurePath.with_nametsyyt=> > MMquu}ahh$6F4SV;.$78 8&&tzz499'+zz#2$'?A Ar)c>|j||jzS)z(Return a new path with the stem changed.)r@r8)rer=s r' with_stemzPurePath.with_stem~s~~dT[[011r)c|j}|j|vs|jr|j|vrtd||r|j dr|dk(rtd|z|j }|st|d|j }|s||z}n|dt| |z}|j|j|j|jdd|gzS)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 rzInvalid suffix %rr?Nr3) rrrr<rr{r8r8rrrr)rer8rr{ old_suffixs r' with_suffixzPurePath.with_suffixs MM 55F?ahh188v+=F<= = &++C0FcM0F;< <yyt=> >[[ &=D)#j/)*V3D&&tzz499'+zz#2$'?A Ar)F)walk_upc&|rd}tjd|d|j|g|}t|gt |j zD]c\}}|j |rnp|s"tt|dt||jdk(sMtdt|dtt|d t|d dg|z|jt|jd z}|j|S) a*Return the relative path to another path identified by the passed arguments. If the operation is not possible (because this is not related to the other path), raise ValueError. The *walk_up* parameter controls whether `..` may be used to resolve the path. zsupport for supplying more than one positional argument to pathlib.PurePath.relative_to() is deprecated and scheduled for removal in Python {remove}z#pathlib.PurePath.relative_to(*args)removez is not in the subpath of r6z'..' segment in z cannot be walkedz and z have different anchorsN) warnings _deprecatedr enumeraterparentsis_relative_tor<rr{rr8)rerrFrNmsgsteprr]s r' relative_tozPurePath.relative_tos >C  !F(/ 1"""57;7#UGd5==.A$ABJD$""4( CI=0J3u:.!YZZd" #3CJ>AR!STT CD }E#e*?VWX X  3tzz?+; <<!t!!5))r)c|rd}tjd|d|j|g|}||k(xs||jvS)zFReturn True if the path is relative to another path or False. zsupport for supplying more than one argument to pathlib.PurePath.is_relative_to() is deprecated and scheduled for removal in Python {remove}z&pathlib.PurePath.is_relative_to(*args)rHrK)rMrNrrP)rerrNrRs r'rQzPurePath.is_relative_tosU >C  !I!$W 6"""57;7}5 55r)c|js |jr0|j|jzft|jzSt|jS)zZAn object providing sequence-like access to the components in the filesystem path.)rrrrrs r'r]zPurePath.partssD ::JJ*,uTZZ/@@ @$ $r)c(|j|g|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). )rrs r'joinpathzPurePath.joinpaths "t!!$666r)cP |j|S#t$r tcYSwxYwrH)rXrrrekeys r' __truediv__zPurePath.__truediv__s+ "==% % "! ! "s %%cR |j||S#t$r tcYSwxYwrH)rrrrZs r' __rtruediv__zPurePath.__rtruediv__s/ "%%c40 0 "! ! "s &&c~|j}|j}|j}|s|S|j|||ddS)zThe logical parent of the path.Nr3)rrrr)rerrrs r'parentzPurePath.parentsBjjyyzzK&&sD$s)<qAHHMzz|222r)Nr?cpt|ts|j|}|t|j}t |j |}|js |jr|j|j duS|jr|j|j duStd)zE Return True if this path matches the given pattern. Nz empty pattern) rrrr.rr_rrrrOrsearchr<)re path_patternr?patterns r'rOzPurePath.match s,1--l;L  !/ >N()<)>$++.d: :_- -r))7rqrrrsrtrrrrrrrfr classmethodrrrrrrrrrrpropertyrrrrr r#r&r)r+rrrr1r{r8r;r=r@rBrErTrQr]rXr\r^r`rPr rlrOrur)r'rr$s&INwwH#,  ,)!!& !++- ! K?( - -// & &] < = < = %%    @ @A2A*;@*6 6%%7" " =="" 23 59.r)rceZdZdZeZdZy)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. ruN)rqrrrsrtrrrrur)r'rr!s HIr)rceZdZdZeZdZy)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. ruN)rqrrrsrtrrrrur)r'rr+s HIr)rc|eZdZdZdZdddZdZdddZdZd Z d Z d Z d Z d Z dZdZdZdZ d5dZdZd6dZdZd7dZdZdZdZdddZdddZd8dZfdZd Zd!Zd"Z e!d#Z"e!d$Z#d%Z$d9d&Z%d'Z&d(Z'd)Z(d:d*Z)d;d+Z*ddd,Z+d-Z,d9d.Z-d/Z.d0Z/d1Z0d9d2Z1d3Z2d4Z3xZ4S) / >>c t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)z3 Whether this path is a directory. NF)rrzst_moderr(r<rer~s r'rjz Path.is_dirfI 499;../ /  #  "% A ? A Ac t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)zq Whether this path is a regular file (also True for symlinks pointing to regular files). NF)r rzrrr(r<rs r'is_filez Path.is_filevsI 499;../ /  #  rc8|jj|S)z5 Check if this path is a mount point )rismountrs r'is_mountz Path.is_mounts}}$$T**r)c t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)z7 Whether this path is a symbolic link. NF)r r|rrr(r<rs r' is_symlinkzPath.is_symlinksG 4::<//0 0  #  rc8|jj|S)z2 Whether this path is a junction. )r isjunctionrs r' is_junctionzPath.is_junctions}}''--r)c t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)z6 Whether this path is a block device. NF)r rzrrr(r<rs r'is_block_devicezPath.is_block_devicerrc t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)z: Whether this path is a character device. NF)r rzrrr(r<rs r'is_char_devicezPath.is_char_devicerrc t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)z. Whether this path is a FIFO. NF)rrzrrr(r<rs r'is_fifoz Path.is_fifoI DIIK//0 0  #  rc t|jjS#t$r}t |sYd}~yd}~wt $rYywxYw)z0 Whether this path is a socket. NF)r rzrrr(r<rs r' is_socketzPath.is_socketrrc|j} |j}|jj ||S#t$r"|j|j}YFwxYw)zoReturn whether other_path is the same or not as this file (as returned by os.path.samefile()). )rzrrrsamestat)re other_pathstother_sts r'samefilez Path.samefilescYY[ =!(H}}%%b(33 =))*5::(A)(A)Nchd|vrtj|}tj||||||S)z Open the file pointed to by this path and return a file object, as the built-in open() function does. b)io text_encodingopen)remode bufferingencodingerrorsnewlines r'rz Path.opens4 d?''1HwwtT9hHHr)cr|jd5}|jcdddS#1swYyxYw)zK Open the file in bytes mode, read it, and close the file. rbrN)rreadrs r' read_byteszPath.read_bytess.YYDY !Q668   ! !s-6ctj|}|jd||5}|jcdddS#1swYyxYw)zJ Open the file in text mode, read it, and close the file. r)rrrN)rrrr)rerrrs r' read_textzPath.read_textsB##H- YYC(6Y Ba668   B Bs AA ct|}|jd5}|j|cdddS#1swYyxYw)zO Open the file in bytes mode, write to it, and close the file. wbrN) memoryviewrwrite)redataviewrs r' write_byteszPath.write_bytess: $ YYDY !Q774= ! ! ! !s 9Act|ts"td|jjzt j |}|jd|||5}|j|cdddS#1swYyxYw)zN Open the file in text mode, write to it, and close the file. zdata must be str, not %sw)rrrrN) rrrrrqrrrr)rerrrrrs r' write_textzPath.write_textss$$6 NN3345 5##H- YYC(67Y SWX774= ! ! S Ss A88Bc#fKtj|D]}|j|yw)zYield path objects of the directory contents. The children are yielded in arbitrary order, and the special entries '.' and '..' are not included. N)rlistdirr~rks r'iterdirz Path.iterdirs, JJt$D**40 0%s/1c,tj|SrH)rrors r'riz Path._scandir#szz$r)ct|}|j}|r||jj|}n|dk7r||}n|}|j |}||_|j |_|j|_ ||gz|_ |Sr) rrrrrrrrrrr)rer{rrrs r'r~zPath._make_child_relpath)st9zz "DMM$5$5#6tf=H _"D6*HH!!(+ JJ YY  D6M r)rmc#Ktjd|||stdj||j |\}}}|s|r t d|d|j j|j jfvr|jdtt||j |}|j|D]}|yw)zIterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern. zpathlib.Path.globzUnacceptable pattern: {!r}%Non-relative patterns are unsupportedr3rVN) rauditr<rrNotImplementedErrorrrrrYrDrrprerqr?rrr>selectorrs r'globz Path.glob9s %tW59@@IJ J#'#3#3G#< T= $%&MN N 2;4==,,dmm.B.BC C   $!% "6 ~V%%d+AG,sCCc#Ktjd|||j|\}}}|s|r td|rB|d|jj |jj fvr|jdtdt|z|j|}|j|D]}|yw)zRecursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree. zpathlib.Path.rglobrr3rV)r4N) rrrrrrrrYrDrrprs r'rglobz Path.rglobIs &g6#'#3#3G#< T= $%&MN N wr{t}}'8'8$--:N:N&OO   $!'E-,@"@$--Q_`%%d+AG,sB>Cc#Ktjd||||g}|r|j}t|tr|' |j }|5g}g} |D]N} | j|} | r|j| j4| j| jP ddd|r| fn|j| f|t|D cgc]} |j| c} z }|ryy#t $r}|||Yd}~d}~wwxYw#t $rd} YwxYw#1swYxYwcc} ww)zBWalk the directory tree from this directory, similar to os.walk().zpathlib.Path.walkNrwF) rrpoprrrirrjrYr{reversedr~) retop_downon_errorrxrrrerrorr filenamesrrjds r'rz Path.walkXsD %tXG99;D$&  !]]_  'E'!&o!N   3!((4(Hi// dHi89 8H;MN;Mad..q1;MN NEM 'UO #'!&' (Os~AE DE  D9#D(5;D914E %E=E E  D% D E  D%%E ( D63D95D66D99E> E cV|rd}tjd|dt| |y)Nzvsupport for supplying keyword arguments to pathlib.PurePath is deprecated and scheduled for removal in Python {remove}zpathlib.PurePath(**kwargs)rHrK)rMrNrrf)rerrrRrs r'rfz Path.__init__s. PC  !=s7 S $r)cz|turtjdk(rtnt}t j |S)Nr)rrr{rrrrrs r'rz Path.__new__s) $;!#D+iC~~c""r)c>tjdtd|S)Nz}pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-opr) stacklevel)rMwarnDeprecationWarningrs r' __enter__zPath.__enter__s#  +)Q 8 r)cyrHru)retvtbs r'__exit__z Path.__exit__s r)c,|jS)z.check_eloops?q*a0Hww%8/N#N"#9AJJ#FGG$Or))strictN)rrealpathrrrz)rerrsr~rs r'resolvez Path.resolves  H   &&tF&;A   q ! q  N   A s.A A$ A! AA!$ B-A;;Bc ddl}|j|jjjS#t $r t dwxYw)z: Return the login name of the file owner. rNz*Path.owner() is unsupported on this system)pwdgetpwuidrzst_uidpw_name ImportErrorr)rers r'ownerz Path.ownersI T << 2 23;; ; T%&RS S T 69Ac ddl}|j|jjjS#t $r t dwxYw)z8 Return the group name of the file gid. rNz*Path.group() is unsupported on this system)grpgetgrgidrzst_gidgr_namerr)rers r'groupz Path.groupsI  T << 2 23;; ; T%&RS S Trcttds td|jtj|S)zD Return the path to which the symbolic link points. readlinkz*os.readlink() not available on this system)hasattrrrrrrs r'rz Path.readlinks4r:&%&RS S!!"++d"344r)c|r tj|dytjtjz}|s|tj z}tj |||}tj|y#t$rYnwxYw)zS Create this file with the given access mode, if it doesn't exist. N)rutimerO_CREATO_WRONLYO_EXCLrclose)rerexist_okrPfds r'touchz Path.touchss  t$  R[[( RYY E WWT5$ '    sA>> B  B c tj||y#t$rF|r|j|k(r|jjdd|j|d|Yyt$r|r|j sYywxYw)z< Create a new directory at this given path. T)rPr FN)rmkdirFileNotFoundErrorr`rrj)rerrPr s r'r z Path.mkdirs{  HHT4   ?dkkT1 KK  dT  : JJtUXJ > 4;;=$1 sA B'BBc4tj|||y)zF Change the permissions of the path, like os.chmod(). rwN)rchmod)rerrxs r'rz Path.chmod+s t_=r)c*|j|dy)z Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's. FrwN)r)rers r'lchmodz Path.lchmod1s 4 /r)cT tj|y#t$r|sYywxYw)zd Remove this file or link. If the path is a directory, use rmdir() instead. N)runlinkr)re missing_oks r'rz Path.unlink8s,   IIdO   s  ''c.tj|y)zF Remove this directory. The directory must be empty. N)rrmdirrs r'rz Path.rmdirCs r)cPtj|||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. )rrenamerretargets r'rz Path.renameIs# $!!&))r)cPtj|||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. )rrrrs r'rz Path.replaceVs# 4 !!&))r)chttds tdtj|||y)z Make this path a symlink pointing to the target path. Note the order of arguments (link, target) is the reverse of os.symlink. symlinkz)os.symlink() not available on this systemN)rrrr)rertarget_is_directorys r' symlink_tozPath.symlink_tocs+ r9%%&QR R 64!45r)cfttds tdtj||y)z Make this path a hard link pointing to the same file as *target*. Note the order of arguments (self, target) is the reverse of os.link's. linkz&os.link() not available on this systemN)rrrr"rs r' hardlink_tozPath.hardlink_tols( r6"%&NO O r)c^|js|js|jr|jddddk(rs|jj |jd}|dddk(r t d|j |\}}}|j||||jddzS|S)zl Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser) rNr5rz#Could not determine home directory.)rrrrrrrr)rehomedirrrrs r'rzPath.expanduservstyy JJ4::a=!,3mm..tzz!}=Gr{c!"#HII"..w7OCt**3dTZZ^6KL L r))rr3NNN)NN)NNN)TNF)F)iT)iFF)5rqrrrsrtrrzr|rrjrrrrrrrrrrrrrrrrir~rrrrfrrrrrrrrrrrrr r rrrrrrr r#rrrs@r'rr8s7I&*>0)-$ "+ .     459"&I! !1  /3 04 +OZ #    %% -06T T5,".2> 0  * *6 r)rc:eZdZdZdZej dk(rdZyy)rzsPath subclass for non-Windows systems. On a POSIX system, instantiating a Path should return this object. rurc4td|jdNzcannot instantiate z on your systemrrqrs r'rzPosixPath.__new__"%%cll%5_EG Gr)Nrqrrrsrtrrr{rrur)r'rr$I ww$ Gr)rc:eZdZdZdZej dk7rdZyy)rzqPath subclass for Windows systems. On a Windows system, instantiating a Path should return this object. rurc4td|jdr(r)rs r'rzWindowsPath.__new__r*r)Nr+rur)r'rrr,r)r)ErtrM functoolsrrrrrIrrM_collections_abcrr!rrrrrzrr r r r r r urllib.parserr __all__ frozensetrj_WINERROR_NOT_READY_WINERROR_INVALID_NAMErr$r%r(cacher.rNr_FNMATCH_PREFIX_FNMATCH_SUFFIXrr8rXr maketransr lru_cacherDrQr_rar7r;r=r:r9rrrPathLikeregisterrrrrr)cs0r'r>st  %//PPP@  5/0/1s1#Y/01/0/1s1#Y/01 "&7E51#% H  **$57#4#4S#9#?#?#D s?+c/.B-BC T- . --t40 1 ::0S!;"; #3#3L77. i  @$'A,@8@:u.vu.t XHhJ 8J Z Gm G G$ G[+10s  H 2 H