grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B òJ¬ûxŽsã @sJdZdZdZdZdZdZdZdZdZddl Z ddl Tddl Z ddl Tddl Z e j d ed d �d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+g Zd,d-„Zd.d „Zd/d „Zd0d„Zd1d„Zd2d„Ze jje_d3d„Zd4d„Zd5d„Zd6d7„Zd8d„Zd9d„Zd:d„Zd;d„ZGdd „Z!d?d!„Z"d@d*„Z#dAZ$dS)Bz7Pathname and path-related operations for the Macintosh.ú:z::Ú.Ú NzDev:Nullé)Ú*zBthe macpath module is deprecated in 3.7 and will be removed in 3.8é)Ú stacklevelÚnormcaseÚisabsÚjoinÚ splitdriveÚsplitÚsplitextÚbasenameÚdirnameÚ commonprefixÚgetsizeÚgetmtimeÚgetatimeÚgetctimeÚislinkÚexistsÚlexistsÚisdirÚisfileÚ expanduserÚ expandvarsÚnormpathÚabspathÚcurdirÚpardirÚsepÚpathsepÚdefpathÚaltsepÚextsepÚdevnullÚrealpathÚsupports_unicode_filenamescCst|tƒrdSdSdS)Nó:r)Ú isinstanceÚbytes)Úpath©r,ú,/opt/alt/python37/lib64/python3.7/macpath.pyÚ _get_colons r.cCs(t|ttfƒs td |jj¡ƒ‚| ¡S)Nz2normcase() argument must be str or bytes, not '{}')r)r*ÚstrÚ TypeErrorÚformatÚ __class__Ú__name__Úlower)r+r,r,r-r's cCs t|ƒ}||ko|dd…|kS)zøReturn true if a path is absolute. On the Mac, relative paths begin with a colon, but as a special case, paths with no colons at all are also relative. Anything else is absolute (the string up to the first colon is the volume name).Né)r.)ÚsÚcolonr,r,r-r .sc GsÄy�t|ƒ}|}|s"|dd…|xj|D]b}|r8t|ƒr>|}q(|dd…|krZ|dd…}||krj||}|dd…|kr‚||}||}q(W|Stttfk r¾tjd|f|žŽ‚YnXdS)Nrr5éÿÿÿÿr )r.r r0ÚAttributeErrorÚ BytesWarningÚ genericpathÚ_check_arg_types)r6Úpr7r+Útr,r,r-r 9s(    cCs�t|ƒ}||kr |dd…|fSd}x0tt|ƒƒD] }|||d…|kr2|d}q2W|d|d…||d…}}|rˆ||krˆ||}||fS)zßSplit a pathname into two parts: the directory leading up to the final bit, and the basename (the filename, without colons, in that directory). The result (s, t) is such that join(s, t) yields the original argument.Nrr5)r.ÚrangeÚlen)r6r7ÚcolÚir+Úfiler,r,r-r Ps  cCs.t|tƒrt |dtd¡St |ttt¡SdS)Nr(ó.)r)r*r;Ú _splitextr#r r$)r=r,r,r-r `s cCs|dd…|fS)a@Split a pathname into a drive specification and the rest of the path. Useful on DOS/Windows/NT; on the Mac, the drive is always empty (don't use the volume name -- it doesn't have the same syntactic and semantic oddities as DOS drive letters, such as there being a separate current directory per drive).Nrr,)r=r,r,r-r gscCs t|ƒdS)Nr)r )r6r,r,r-rsócCs t|ƒdS)Nr5)r )r6r,r,r-rtrFcCs*t|ƒs dSt|ƒ}t|ƒdko(|d S)NFrr5)r r r@)r6Ú componentsr,r,r-ÚismountvsrHcCs*yddl}|j |d¡dSdSdS)z6Return true if the pathname refers to a symbolic link.rNrF)Ú Carbon.FileÚFileZResolveAliasFile)r6ÚCarbonr,r,r-r|s cCs(yt |¡}Wntk r"dSXdS)zCTest whether a path exists. Returns True for broken symbolic linksFT)ÚosÚlstatÚOSError)r+Ústr,r,r-rˆs cCs|S)zEDummy to retain interface-compatibility with other operating systems.r,)r+r,r,r-r‘scCs|S)zEDummy to retain interface-compatibility with other operating systems.r,)r+r,r,r-r–sc@seZdZdZdS)Ú norm_errorzPath cannot be normalizedN)r3Ú __module__Ú __qualname__Ú__doc__r,r,r,r-rPšsrPcCsÌt|ƒ}||kr||S| |¡}d}x^|t|ƒdkr„||sz||drz|dkrp||d|d…=|d}q‚tdƒ‚q(|d}q(W| |¡}|dd…|krÈt|ƒdkrÈ||t|ƒkrÈ|dd…}|S)zLNormalize a pathname. Will return the same result for equivalent paths.r5z+Cannot use :: immediately after volume namer8Nr)r.r r@rPr )r6r7ÚcompsrBr,r,r-r�s      , cCs6t|ƒs.t|tƒrt ¡}nt ¡}t||ƒ}t|ƒS)zReturn an absolute path.)r r)r*rLÚgetcwdbÚgetcwdr r)r+Úcwdr,r,r-rºs    c Cs¨t|ƒ}y ddl}Wntk r(|SX|s2|St|ƒ}| |¡}|d|}xR|dd…D]B}t||ƒ}y|j |d¡d ¡}Wq^|jj k ržYq^Xq^W|S)Nrr5) rrIÚ ImportErrorr.r r rJZFSResolveAliasFileZ as_pathnameÚError)r+rKr7rGÚcr,r,r-r&Ås"     T)%rSrrr$r r!r"r#r%rLÚstatr;ÚwarningsÚwarnÚDeprecationWarningÚ__all__r.rr r r r rEr rrrHrrrrÚ ExceptionrPrrr&r'r,r,r,r-ÚsR