选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
a ´i¾Çã@s2ddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z m Z m Z mZmZddlmZddlmZmZmZmZmZmZmZddlmZdZgd¢Zd Zd Z d Z!e e eefZ"ee e!fZ#d d „Z$dd„Z%Gdd„de&ƒZ'Gdd„de'ƒZ(Gdd„de'ƒZ)e(ƒZ*e)ƒZ+Gdd„dƒZ,Gdd„de,ƒZ-e-ƒZ.dd„Z/e0edƒ�rbe 1¡e/ƒZ/Gdd„dƒZ2Gdd „d ƒZ3Gd!d"„d"e2ƒZ4Gd#d$„d$e2ƒZ5Gd%d&„d&e2ƒZ6Gd'd(„d(e ƒZ7Gd)d*„d*e&ƒZ8ej9 :e8¡Gd+d,„d,e8ƒZ;Gd-d.„d.e8ƒZGd3d4„d4e=e<ƒZ?dS)5éN)ÚSequence)ÚEINVALÚENOENTÚENOTDIRÚEBADFÚELOOP)Ú attrgetter)ÚS_ISDIRÚS_ISLNKÚS_ISREGÚS_ISSOCKÚS_ISBLKÚS_ISCHRÚS_ISFIFO)Úquote_from_bytesT)ÚPurePathÚ PurePosixPathÚPureWindowsPathÚPathÚ PosixPathÚ WindowsPathéé{i�cCs t|ddƒtvpt|ddƒtvS)NÚerrnoÚwinerror)ÚgetattrÚ_IGNORED_ERROSÚ_IGNORED_WINERRORS)Ú exception©rú/usr/lib64/python3.9/pathlib.pyÚ _ignore_error(sÿr!cCsd|vpd|vpd|vS)NÚ*ú?ú[r)Úpatrrr Ú_is_wildcard_pattern-sr&c@s(eZdZdZdd„Zdd„Zdd„ZdS) Ú_FlavourzPA flavour implements a particular (platform-specific) set of path semantics.cCs|jj|_dS©N)ÚsepÚjoin©Úselfrrr Ú__init__7sz_Flavour.__init__c Csg}|j}|j}d}}t|ƒ}|D]Æ}|s.q$|r>| ||¡}| |¡\}}} || vrˆt|  |¡ƒD] } | rd| dkrd| t | ¡¡qdn| r¤| dkr¤| t | ¡¡|s¬|r$|sæ|D]0}|s¾q´|rÎ| ||¡}| |¡d}|r´qæq´qìq$|sö|�r| ||¡|  ¡|||fS)NÚÚ.r) r)ÚaltsepÚreversedÚreplaceÚ splitrootÚsplitÚappendÚsysÚinternÚreverse) r,ÚpartsÚparsedr)r0ÚdrvÚrootÚitÚpartÚrelÚxrrr Ú parse_parts:s@     z_Flavour.parse_partscCsz|r*|sp|rp||||g|dd…fSnF|rb||ksJ| |¡| |¡krp||||dd…fSn||||fS|||fS)z‘ Join the two paths represented by the respective (drive, root, parts) tuples. Return a new (drive, root, parts) tuple. éN)Úcasefold)r,r;r<r9Údrv2Úroot2Úparts2rrr Újoin_parsed_parts`sz_Flavour.join_parsed_partsN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r-rArGrrrr r'3s&r'c@sžeZdZdZdZdZeZej dkZ e dƒZ dZ hd£dd „d DƒBd d „d DƒBZefd d „Zdd„Zdd„Zdd„Ze fdd„Zdd„Zdd„Zdd„ZdS)Ú_WindowsFlavourú\ú/TÚntZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZz\\?\>zCONIN$ÚCONÚAUXÚNULÚPRNzCONOUT$cCsh|] }d|’qS)zCOM%sr©Ú.0Úcrrr Ú ‚óz_WindowsFlavour.u123456789¹²³cCsh|] }d|’qS)zLPT%srrTrrr rWƒrXc Cs\|dd…}|dd…}||krP||krP| |¡\}}|dd…}|dd…}nd}|dd…}||krü||krü||krü| |d¡}|dkrü| ||d¡}||dkrü|dkr¸t|ƒ}|rÞ||d|…|||dd…fS|d|…|||dd…fSd} } |dk�r6||jv�r6|dd…} |dd…}|}||k�rN|} | |¡}|| | |fS)NrrBér.ééÿÿÿÿú:)Ú_split_extended_pathÚfindÚlenÚ drive_lettersÚlstrip) r,r>r)ÚfirstÚsecondÚprefixÚthirdÚindexÚindex2r;r<rrr r3•s6      "    z_WindowsFlavour.splitrootcCs| ¡Sr(©Úlower©r,Úsrrr rC¼sz_WindowsFlavour.casefoldcCsdd„|DƒS)NcSsg|] }| ¡‘qSrrh)rUÚprrr Ú ÀrXz2_WindowsFlavour.casefold_parts..r©r,r9rrr Úcasefold_parts¿sz_WindowsFlavour.casefold_partscCst t |¡tj¡jSr()ÚreÚcompileÚfnmatchÚ translateÚ IGNORECASEÚ fullmatch©r,Úpatternrrr Úcompile_patternÂsz_WindowsFlavour.compile_patterncCsXd}| |¡rP|dd…}|dd…}| d¡rP||dd…7}d|dd…}||fS)Nr.ézUNC\rZrM)Ú startswith)r,rkÚ ext_prefixrdrrr r]Ås    z$_WindowsFlavour._split_extended_pathcCsJ|sdS|d d¡rdS|d d¡d d¡d d¡}| ¡|jvS)NFrz\\r[r/r\ú )rzÚ partitionÚrstripÚupperÚreserved_names)r,r9Únamerrr Ú is_reservedÏs "z_WindowsFlavour.is_reservedcCsd|j}t|ƒdkrJ|ddkrJ| ¡dd… d¡}d|t| d¡ƒfSdt| ¡ d¡ƒSdS)NrYrBr\rNz file:///%s/%szutf-8zfile:)Údriver_Úas_posixraÚurlquote_from_bytesÚencode)r,ÚpathrƒÚrestrrr Úmake_uriÜsÿz_WindowsFlavour.make_uricCsÚdtjvrtjd}nHdtjvrVztjd}WntyDd}Yn0|tjd}ntdƒ‚|rÖtjd|krÖ| |f¡\}}}|dtjdkr td|ƒ‚||d<|s°|rÌ||| |d d…¡}n | |¡}|S) NÚ USERPROFILEÚHOMEPATHÚ HOMEDRIVEr.zCan't determine home directoryÚUSERNAMEr[ú%Can't determine home directory for %rrB)ÚosÚenvironÚKeyErrorÚ RuntimeErrorrAr*)r,ÚusernameÚuserhomer;r<r9rrr Ú gethomedirès*     ÿ z_WindowsFlavour.gethomedirN)rHrIrJr)r0Úhas_drvÚntpathÚpathmodr�r�Ú is_supportedÚsetr`Úext_namespace_prefixr€r3rCrorxr]r‚r‰r•rrrr rLrs*  ÿ þÿ '   rLc@sbeZdZdZdZdZeZej dkZ efdd„Z dd„Z d d „Z d d „Zd d„Zdd„Zdd„ZdS)Ú _PosixFlavourrNr.FrOcCsV|rH|d|krH| |¡}t|ƒt|ƒdkrr)Ú stripped_partrrr r3 s   z_PosixFlavour.splitrootcCs|Sr(rrjrrr rCsz_PosixFlavour.casefoldcCs|Sr(rrnrrr rosz_PosixFlavour.casefold_partscCst t |¡¡jSr()rprqrrrsrurvrrr rx"sz_PosixFlavour.compile_patterncCsdS©NFrrnrrr r‚%sz_PosixFlavour.is_reservedcCst|ƒ}dt|ƒS)Nzfile://)Úbytesr…)r,r‡Úbpathrrr r‰(sz_PosixFlavour.make_uricCsx|s>z tjdWSty:ddl}| t ¡¡jYS0n6ddl}z| |¡jWStyrtd|ƒ‚Yn0dS)NÚHOMErrŽ) r�r�r‘ÚpwdÚgetpwuidÚgetuidÚpw_dirÚgetpwnamr’)r,r“r¢rrr r•.s   ÿz_PosixFlavour.gethomedirN)rHrIrJr)r0r–Ú posixpathr˜r�r�r™r3rCrorxr‚r‰r•rrrr rœs  rœc@seZdZdZdS)Ú _AccessorzjAn accessor implements a particular (system-specific or not) way of accessing paths on the filesystem.N)rHrIrJrKrrrr r¨Bsr¨c@sÞeZdZejZejZejZejZejZej Z e edƒr>ej Z ndd„Z ej Z ej Z e edƒrdejZn edd„ƒZejZejZejZe edƒr”ejZn dd d „ZejZd d „Zd d„Zdd„ZejZeejjƒZeejjƒZdS)Ú_NormalAccessorÚlchmodcCs tdƒ‚dS)Nz%lchmod() not available on this system©ÚNotImplementedError)r,ÚpathobjÚmoderrr rªXsz_NormalAccessor.lchmodÚlinkcCs tdƒ‚dS)Nz&os.link() not available on this systemr«©r,Útargetrrr Úlink_tobsz_NormalAccessor.link_toÚsymlinkFcCs tdƒ‚dS)Nz)os.symlink() not available on this systemr«)r,ÚsrcÚdstÚtarget_is_directoryrrr r³osz_NormalAccessor.symlinkcCs t |¡Sr()r�Úreadlink©r,r‡rrr r·usz_NormalAccessor.readlinkcCs>zddl}| | |¡j¡jWSty8tdƒ‚Yn0dS)Nrz*Path.owner() is unsupported on this system)r¢r£ÚstatÚst_uidÚpw_nameÚ ImportErrorr¬)r,r‡r¢rrr Úownerxs  z_NormalAccessor.ownercCs>zddl}| | |¡j¡jWSty8tdƒ‚Yn0dS)Nrz*Path.group() is unsupported on this system)ÚgrpÚgetgrgidr¹Úst_gidÚgr_namer¼r¬)r,r‡r¾rrr Úgroups  z_NormalAccessor.groupN)F)rHrIrJr�r¹ÚlstatÚopenÚlistdirÚscandirÚchmodÚhasattrrªÚmkdirÚunlinkr¯r²Ú staticmethodÚrmdirÚrenamer2r³Úutimer·r½rÂÚgetcwdr‡Ú expanduserÚrealpathrrrr r©Gs8      r©cCsR|d}|dd…}|dkr"t}n$d|vr4tdƒ‚nt|ƒrBt}nt}||||ƒS)NrrBú**z:Invalid pattern: '**' can only be an entire path component)Ú_RecursiveWildcardSelectorÚ ValueErrorr&Ú_WildcardSelectorÚ_PreciseSelector)Ú pattern_partsÚflavourr%Ú child_partsÚclsrrr Ú_make_selector”s  rÛÚ lru_cachec@s eZdZdZdd„Zdd„ZdS)Ú _SelectorzYA selector matches a specific glob pattern part against the children of a given path.cCs0||_|rt||ƒ|_d|_ntƒ|_d|_dS)NTF)rÙrÛÚ successorÚdironlyÚ_TerminatingSelector)r,rÙrØrrr r-©s  z_Selector.__init__cCs<t|ƒ}|j}|j}|jj}||ƒs,tgƒS| ||||¡S)zuIterate over all child paths of `parent_path` matched by this selector. This can contain parent_path itself.)ÚtypeÚis_dirÚexistsÚ _accessorrÆÚiterÚ _select_from)r,Ú parent_pathÚpath_clsrârãrÆrrr Ú select_from²sz_Selector.select_fromN)rHrIrJrKr-rérrrr rÝ¥s rÝc@seZdZdd„ZdS)ràccs |VdSr(r)r,rçrârãrÆrrr ræÀsz!_TerminatingSelector._select_fromN)rHrIrJrærrrr rà¾sràc@seZdZdd„Zdd„ZdS)rÖcCs||_t |||¡dSr()r�rÝr-)r,r�rÙrØrrr r-Æsz_PreciseSelector.__init__ccsZz@| |j¡}|jr|n||ƒr>|j ||||¡D] }|Vq2WntyTYdS0dSr()Ú_make_child_relpathr�rßrÞræÚPermissionError)r,rçrârãrÆr‡rlrrr ræÊs   z_PreciseSelector._select_fromN©rHrIrJr-rærrrr rÖÄsrÖc@seZdZdd„Zdd„ZdS)rÕcCs| |¡|_t |||¡dSr()rxÚmatchrÝr-©r,r%rÙrØrrr r-Ös z_WildcardSelector.__init__c csâzÈ||ƒ�}t|ƒ}Wdƒn1s(0Y|D]Ž}|jrŒz| ¡sNWq6Wn:tyŠ}z"t|ƒsj‚WYd}~q6WYd}~n d}~00|j} | | ¡r6| | ¡} |j  | |||¡D] } | Vq¸q6Wnt yÜYdS0dSr() ÚlistrßrâÚOSErrorr!r�rírêrÞrærë) r,rçrârãrÆÚ scandir_itÚentriesÚentryÚer�r‡rlrrr ræÚs& &"   z_WildcardSelector._select_fromNrìrrrr rÕÔsrÕc@s$eZdZdd„Zdd„Zdd„ZdS)rÓcCst |||¡dSr()rÝr-rîrrr r-õsz#_RecursiveWildcardSelector.__init__c csÐ|Vz°||ƒ�}t|ƒ}Wdƒn1s.0Y|D]v}d}z | ¡}Wn.ty~}zt|ƒsj‚WYd}~n d}~00|r<| ¡s<| |j¡} | | ||¡D] } | Vq¦q)ÚformatrþrHr+rrr Ú__repr__7sz_PathParents.__repr__N) rHrIrJrKÚ __slots__r-rrr rrrr rýs rýc@s´eZdZdZdZdd„Zdd„Zedd„ƒZed\d d „ƒZ ed]d d „ƒZ edd„ƒZ dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zed d!„ƒZd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zeed0ƒd1d2�Zeed3ƒd4d2�Zed5d6„ƒZ ed7d8„ƒZ!ed9d:„ƒZ"ed;d<„ƒZ#ed=d>„ƒZ$d?d@„Z%dAdB„Z&dCdD„Z'dEdF„Z(dGdH„Z)edIdJ„ƒZ*dKdL„Z+dMdN„Z,dOdP„Z-edQdR„ƒZ.edSdT„ƒZ/dUdV„Z0dWdX„Z1dYdZ„Z2d[S)^ra|Base class for manipulating paths without I/O. PurePath represents a filesystem path and offers operations which don't imply any actual filesystem I/O. Depending on your system, instantiating a PurePath will return either a PurePosixPath or a PureWindowsPath object. You can also instantiate either of these classes directly, regardless of your system. )rÿrrÚ_strÚ_hashÚ_ppartsÚ_cached_cpartscGs$|turtjdkrtnt}| |¡S)z÷Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object. rO)rr�r�rrÚ _from_parts)rÚÚargsrrr Ú__new__IszPurePath.__new__cCs|jt|jƒfSr()Ú __class__Útuplerr+rrr Ú __reduce__SszPurePath.__reduce__cCsdg}|D]N}t|tƒr"||j7}qt |¡}t|tƒrF| t|ƒ¡qtdt|ƒƒ‚q|j   |¡S)NzNargument should be a str object or an os.PathLike object returning str, not %r) Ú isinstancerrr�ÚfspathÚstrr5Ú TypeErrorráÚ_flavourrA)rÚrr9Úarrr Ú _parse_argsXs    þÿzPurePath._parse_argsTcCs<t |¡}| |¡\}}}||_||_||_|r8| ¡|Sr()ÚobjectrrrÿrrÚ_init)rÚrÚinitr,r;r<r9rrr rls zPurePath._from_partscCs,t |¡}||_||_||_|r(| ¡|Sr()rrrÿrrr)rÚr;r<r9rr,rrr rys zPurePath._from_parsed_partscCs4|s|r$|||j |dd…¡S|j |¡SdSr)rr*)rÚr;r<r9rrr Ú_format_parsed_partsƒszPurePath._format_parsed_partscCsdSr(rr+rrr rŠszPurePath._initcCs@| |¡\}}}|j |j|j|j|||¡\}}}| |||¡Sr()rrrGrÿrrr)r,rr;r<r9rrr Ú _make_childŽs ÿ zPurePath._make_childcCs@z|jWSty:| |j|j|j¡p,d|_|jYS0dS)z[Return the string representation of the path, suitable for passing to system calls.r/N)r ÚAttributeErrorrrÿrrr+rrr Ú__str__”s  ÿÿzPurePath.__str__cCst|ƒSr()rr+rrr Ú __fspath__žszPurePath.__fspath__cCs|j}t|ƒ |jd¡S)zNReturn the string representation of the path with forward (/) slashes.rN)rrr2r)©r,Úfrrr r„¡szPurePath.as_posixcCs t |¡S)zaReturn the bytes representation of the path. This is only recommended to use under Unix.)r�Úfsencoder+rrr Ú __bytes__§szPurePath.__bytes__cCsd |jj| ¡¡S)Nz{}({!r}))rrrHr„r+rrr r ¬szPurePath.__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_absoluterÔrr‰r+rrr Úas_uri¯szPurePath.as_uricCs6z|jWSty0|j |j¡|_|jYS0dSr()rr!rrorr+rrr Ú_cpartsµs  zPurePath._cpartscCs&t|tƒstS|j|jko$|j|juSr()rrÚNotImplementedr*r©r,Úotherrrr Ú__eq__¾s zPurePath.__eq__cCs6z|jWSty0tt|jƒƒ|_|jYS0dSr()r r!Úhashrr*r+rrr Ú__hash__Ãs  zPurePath.__hash__cCs&t|tƒr|j|jurtS|j|jkSr(©rrrr+r*r,rrr Ú__lt__ÊszPurePath.__lt__cCs&t|tƒr|j|jurtS|j|jkSr(r1r,rrr Ú__le__ÏszPurePath.__le__cCs&t|tƒr|j|jurtS|j|jkSr(r1r,rrr Ú__gt__ÔszPurePath.__gt__cCs&t|tƒr|j|jurtS|j|jkSr(r1r,rrr Ú__ge__ÙszPurePath.__ge__cCs|Sr(r)rÚrárrr Ú__class_getitem__ÞszPurePath.__class_getitem__rÿz.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 ''.)rÿr)r,Úanchorrrr r8çs zPurePath.anchorcCs.|j}t|ƒ|js|jrdndkr&dS|dS)z!The final path component, if any.rBrr.r[)rr_rÿrrnrrr r�ísz PurePath.namecCsD|j}| d¡}d|kr,t|ƒdkr.rBN)r�Úendswithrar4©r,r�rrr Úsuffixess   zPurePath.suffixescCsD|j}| d¡}d|kr,t|ƒdkrs, * þ ÿzPurePath.relative_tocGs*z|j|ŽWdSty$YdS0dS)zFReturn True if the path is relative to another path or False. TFN)rOrÔr,rrr Úis_relative_to_s   zPurePath.is_relative_tocCs2z|jWSty,t|jƒ|_|jYS0dS)zZAn object providing sequence-like access to the components in the filesystem path.N)r r!rrr+rrr r9hs   zPurePath.partscGs | |¡S)zîCombine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored). )r )r,rrrr ÚjoinpathtszPurePath.joinpathcCs*z| |f¡WSty$tYS0dSr()r rr+©r,Úkeyrrr Ú __truediv__|s zPurePath.__truediv__cCs0z| |g|j¡WSty*tYS0dSr()rrrr+rRrrr Ú __rtruediv__‚s zPurePath.__rtruediv__cCs@|j}|j}|j}t|ƒdkr*|s&|r*|S| |||dd…¡S)zThe logical parent of the path.rBNr[)rÿrrr_r)r,r;r<r9rrr Úparentˆs zPurePath.parentcCst|ƒS)z*A sequence of this path's logical parents.)rýr+rrr Úparents’szPurePath.parentscCs|js dS|jj pt|jƒS)zSTrue if the path is absolute (has both a root and, if applicable, a drive).F)rrr–Úboolrÿr+rrr r(—szPurePath.is_absolutecCs|j |j¡S)zaReturn True if the path contains one of the special names reserved by the system, if any.)rr‚rr+rrr r‚žszPurePath.is_reservedc CsÒ|jj}||ƒ}|j |f¡\}}}|s0tdƒ‚|rF|||jƒkrFdS|r\|||jƒkr\dS|j}|sj|rŒt|ƒt|ƒkr~dS|dd…}nt|ƒt|ƒkr dStt |ƒt |ƒƒD]\}}t   ||¡s²dSq²dS)zE Return True if this path matches the given pattern. z empty patternFrBNT) rrCrArÔrÿrr*r_Úzipr1rrÚ fnmatchcase) r,Ú path_patternrMr;r<Ú pat_partsr9r>r%rrr rí£s( zPurePath.matchN)T)T)3rHrIrJrKr rrÚ classmethodrrrrrr r"r#r„r'r r)Úpropertyr*r.r0r2r3r4r5r6rrƒr<r8r�r=r@rArCrDrFrOrPr9rQrTrUrVrWr(r‚rírrrr r;s|       ÿÿ      !    rc@seZdZdZeZdZdS)rz¼PurePath subclass for non-Windows systems. On a POSIX system, instantiating a PurePath should return this object. However, you can also instantiate it directly on any system. rN)rHrIrJrKÚ_posix_flavourrr rrrr rÁsrc@seZdZdZeZdZdS)rzºPurePath subclass for Windows systems. On a Windows system, instantiating a PurePath should return this object. However, you can also instantiate it directly on any system. rN)rHrIrJrKÚ_windows_flavourrr rrrr rËsrc@sšeZdZdZdZdd„Zdddd„Zdd „Zd d „Zd d „Z dedd„Z dfdd„Z e dd„ƒZ e dd„ƒZdd„Zdd„Zdd„Zdd„Zd d!„Zdgd#d$„Zd%d&„Zd'd(„Zd)d*„Zdhd-d.„Zd/d0„Zdid1d2„Zd3d4„Zdjd5d6„Zd7d8„Zdkd:d;„Zdldd?„Z d@dA„Z!dmdBdC„Z"dDdE„Z#dFdG„Z$dHdI„Z%dJdK„Z&dndLdM„Z'dNdO„Z(dPdQ„Z)dRdS„Z*dTdU„Z+dVdW„Z,dXdY„Z-dZd[„Z.d\d]„Z/d^d_„Z0d`da„Z1dbdc„Z2dS)ora¡PurePath subclass that can make system calls. Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa. )räcOsL|turtjdkrtnt}|j|dd�}|jjs@td|j fƒ‚|  ¡|S)NrOF©rz$cannot instantiate %r on your system) rr�r�rrrrr™r¬rHr)rÚrÚkwargsr,rrr råsÿz Path.__new__NcCs|dur|j|_nt|_dSr()räÚ_normal_accessor)r,Útemplaterrr rïs z Path._initcCs|j|g}| |j|j|¡Sr()rrrÿr)r,r>r9rrr rêøs zPath._make_child_relpathcCs|Sr(rr+rrr Ú __enter__þszPath.__enter__cCsdSr(r)r,ÚtÚvÚtbrrr Ú__exit__s z Path.__exit__é¶cCs|j |||¡Sr(©rärÄ)r,r�Úflagsr®rrr Ú_opener sz Path._openeréÿcCs|j |||¡S)zm Open the file pointed by this path and return a file descriptor, as os.open() does. rk)r,rlr®rrr Ú _raw_openszPath._raw_opencCs |t ¡ƒS)zjReturn a new path pointing to the current working directory (as returned by os.getcwd()). )r�rÏ©rÚrrr ÚcwdszPath.cwdcCs||ƒj d¡ƒS)zrReturn a new path pointing to the user's home directory (as returned by os.path.expanduser('~')). N)rr•rprrr Úhome sz Path.homecCsB| ¡}z | ¡}Wnty2|j |¡}Yn0tj ||¡S)zoReturn whether other_path is the same or not as this file (as returned by os.path.samefile()). )r¹r!rär�r‡Úsamestat)r,Ú other_pathÚstÚother_strrr Úsamefile's   z Path.samefileccs,|j |¡D]}|dvrq | |¡Vq dS)zyIterate over the files in this directory. Does not yield any result for the special paths '.' and '..'. >z..r/N)rärÅrêr?rrr Úiterdir2sz Path.iterdirccsnt d||¡|s td |¡ƒ‚|j |f¡\}}}|s<|rDtdƒ‚tt|ƒ|jƒ}|  |¡D] }|Vq^dS)z‘Iterate 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 unsupportedN) r6ÚauditrÔrrrAr¬rÛrré©r,rwr;r<r×Úselectorrlrrr Úglob<sz Path.globccs`t d||¡|j |f¡\}}}|s*|r2tdƒ‚tdt|ƒ|jƒ}| |¡D] }|VqPdS)z¡Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree. zpathlib.Path.rglobry)rÒN)r6rzrrAr¬rÛrrér{rrr ÚrglobJsz Path.rglobcCs6| ¡r |S|jt ¡g|jdd�}|j|d�|S)aReturn an absolute version of this path. This function works even if the path doesn't point to anything. No normalization is done, i.e. all '.' and '..' will be kept along. Use resolve() to get the canonical path to a file. Fra©rd)r(rr�rÏrr)r,Úobjrrr ÚabsoluteWs  z Path.absoluteFc Csšdd„}z|jj||d�}Wn.tyJ}z||ƒ‚WYd}~n d}~00| |f¡}|s–z | ¡Wn,ty”}z||ƒWYd}~n d}~00|S)z± Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows). cSs0t|ddƒ}|jtks|tkr,td|jƒ‚dS)NrrzSymlink loop from %r)rrrÚ_WINERROR_CANT_RESOLVE_FILENAMEr’Úfilename)rôrrrr Ú check_eloopns z!Path.resolve..check_eloop)ÚstrictN)rärÑrðrr¹)r,r…r„rkrôrlrrr Úresolvegs  z Path.resolvecCs |j |¡S)zh Return the result of the stat() system call on this path, like os.stat() does. )rär¹r+rrr r¹ƒsz Path.statcCs |j |¡S)z: Return the login name of the file owner. )rär½r+rrr r½Šsz Path.ownercCs |j |¡S)z8 Return the group name of the file gid. )rärÂr+rrr rÂ�sz Path.groupÚrr[c Cstj|||||||jd�S)z| Open the file pointed by this path and return a file object, as the built-in open() function does. )Úopener)ÚiorÄrm)r,r®Ú bufferingÚencodingÚerrorsÚnewlinerrr rÄ–sÿz Path.opencCs8|jdd��}| ¡WdƒS1s*0YdS)zK Open the file in bytes mode, read it, and close the file. Úrb©r®N©rÄÚreadr$rrr Ú read_bytesŸszPath.read_bytescCs<|jd||d��}| ¡WdƒS1s.0YdS)zJ Open the file in text mode, read it, and close the file. r‡©r®r‹rŒNr�)r,r‹rŒr%rrr Ú read_text¦szPath.read_textcCsBt|ƒ}|jdd��}| |¡WdƒS1s40YdS)zO Open the file in bytes mode, write to it, and close the file. Úwbr�N)Ú memoryviewrÄÚwrite)r,ÚdataÚviewr%rrr Ú write_bytes­szPath.write_bytescCsXt|tƒstd|jjƒ‚|jd||d��}| |¡WdƒS1sJ0YdS)zN Open the file in text mode, write to it, and close the file. zdata must be str, not %sÚwr“N)rrrrrHrÄr—)r,r˜r‹rŒr%rrr Ú write_text¶s  ÿzPath.write_textcCs,|j |¡}|j|fdd�}|j|d�|S)zD Return the path to which the symbolic link points. Frar)rär·rr)r,r‡r€rrr r·Às  z Path.readlinkTcCsb|r.z|j |d¡Wnty(Yn0dStjtjB}|sH|tjO}| ||¡}t |¡dS)zS Create this file with the given access mode, if it doesn't exist. N) rärÎrðr�ÚO_CREATÚO_WRONLYÚO_EXCLroÚclose)r,r®Úexist_okrlÚfdrrr ÚtouchÉs    z Path.touchcCsxz|j ||¡Wn`tyT|r.|j|kr0‚|jjddd�|j|d|d�Yn tyr|rl| ¡sn‚Yn0dS)z< Create a new directory at this given path. T)rWr¡FN)rärÉÚFileNotFoundErrorrVrðrâ)r,r®rWr¡rrr rÉÞs   z Path.mkdircCs|j ||¡dS)zF Change the permissions of the path, like os.chmod(). N)rärÇ©r,r®rrr rÇïsz Path.chmodcCs|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ärªr¥rrr rªõsz Path.lchmodcCs.z|j |¡Wnty(|s$‚Yn0dS)zd Remove this file or link. If the path is a directory, use rmdir() instead. N)rärÊr¤)r,Ú missing_okrrr rÊüs  z Path.unlinkcCs|j |¡dS)zF Remove this directory. The directory must be empty. N)rärÌr+rrr rÌsz Path.rmdircCs |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ärÃr+rrr rà sz Path.lstatcCs|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ärÍrr°rrr rÍs z Path.renamecCs|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är2rr°rrr r2!s z Path.replacecCs|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är³)r,r±r¶rrr Ú symlink_to.szPath.symlink_tocCs|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är²r°rrr r²5s z Path.link_toc CsTz | ¡WnBty<}zt|ƒs&‚WYd}~dSd}~0tyNYdS0dS)z+ Whether this path exists. NFT)r¹rðr!rÔ©r,rôrrr rãCs  z Path.existsc CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)z3 Whether this path is a directory. NF)r r¹Úst_moderðr!rÔr¨rrr râRs z Path.is_dirc CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)zq Whether this path is a regular file (also True for symlinks pointing to regular files). NF)r r¹r©rðr!rÔr¨rrr Úis_filebs z Path.is_filecCsn| ¡r| ¡sdSz|j ¡j}Wnty8YdS0| ¡j}||krPdS| ¡j}|j ¡j}||kS)z; Check if this path is a POSIX mount point FT)rãrârVr¹Úst_devrðÚst_ino)r,Ú parent_devÚdevÚinoÚ parent_inorrr Úis_mountss    z Path.is_mountc CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)z7 Whether this path is a symbolic link. NF)r rÃr©rðr!rÔr¨rrr rõ‡s zPath.is_symlinkc CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)z6 Whether this path is a block device. NF)r r¹r©rðr!rÔr¨rrr Úis_block_device–s zPath.is_block_devicec CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)z: Whether this path is a character device. NF)rr¹r©rðr!rÔr¨rrr Úis_char_device¦s zPath.is_char_devicec CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)z. Whether this path is a FIFO. NF)rr¹r©rðr!rÔr¨rrr Úis_fifo¶s z Path.is_fifoc CsXzt| ¡jƒWSty@}zt|ƒs*‚WYd}~dSd}~0tyRYdS0dS)z0 Whether this path is a socket. NF)r r¹r©rðr!rÔr¨rrr Ú is_socketÆs zPath.is_socketcCs`|js\|js\|jr\|jddd…dkr\|j |jddd…¡}| |g|jdd…¡S|S)zl Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser) rNrBú~)rÿrrrr•r)r,Úhomedirrrr rÐÖs ÿÿzPath.expanduser)N)rj)rn)F)r‡r[NNN)NN)NN)rjT)rnFF)F)F)3rHrIrJrKr rrrêrerirmror]rqrrrwrxr}r~r�r†r¹r½rÂrÄr’r”ršrœr·r£rÉrÇrªrÊrÌrÃrÍr2r§r²rãrârªr±rõr²r³r´rµrÐrrrr rØsh þ         ÿ        rc@seZdZdZdZdS)rzsPath subclass for non-Windows systems. On a POSIX system, instantiating a Path should return this object. rN)rHrIrJrKr rrrr râsrc@seZdZdZdZdd„ZdS)rzqPath subclass for Windows systems. On a Windows system, instantiating a Path should return this object. rcCs tdƒ‚dS)Nz-Path.is_mount() is unsupported on this systemr«r+rrr r±ðszWindowsPath.is_mountN)rHrIrJrKr r±rrrr résr)@rrÚ functoolsr‰r—r�r§rpr6Ú_collections_abcrrrrrrrÚoperatorrr¹r r r r r rrÚ urllib.parserr…Úsupports_symlinksÚ__all__Ú_WINERROR_NOT_READYÚ_WINERROR_INVALID_NAMEr‚rrr!r&rr'rLrœr`r_r¨r©rcrÛrÈrÜrÝràrÖrÕrÓrýrÚPathLikeÚregisterrrrrrrrrr Úsp  $   ý?9F  ,