eaiovnaovbqoebvqoeavibavo B  f @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 Zd0dZd1dZd2dZe jje_d3dZd4dZd5dZd6d7Zd8dZd9dZd:dZd;dZGdd 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) stacklevelnormcaseisabsjoin splitdrivesplitsplitextbasenamedirname commonprefixgetsizegetmtimegetatimegetctimeislinkexistslexistsisdirisfile expanduser expandvarsnormpathabspathcurdirpardirseppathsepdefpathaltsepextsepdevnullrealpathsupports_unicode_filenamescCst|trdSdSdS)N:r) isinstancebytes)pathr,,/opt/alt/python37/lib64/python3.7/macpath.py _get_colons r.cCs(t|ttfs td|jj|S)Nz2normcase() argument must be str or bytes, not '{}')r)r*str TypeErrorformat __class____name__lower)r+r,r,r-r's cCs t|}||ko|dd|kS)zReturn 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.)scolonr,r,r-r .sc Gsyt|}|}|s"|dd|xj|D]b}|r8t|r>|}q(|dd|krZ|dd}||krj||}|dd|kr||}||}q(W|Stttfk rtjd|f|YnXdS)Nrr5r )r.r r0AttributeError BytesWarning genericpath_check_arg_types)r6pr7r+tr,r,r-r 9s(    cCst|}||kr |dd|fSd}x0tt|D] }|||d|kr2|d}q2W|d|d||d}}|r||kr||}||fS)zSplit 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.rangelen)r6r7colir+filer,r,r-r Ps  cCs.t|trt|dtdSt|tttSdS)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-rscCs 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|ddSdSdS)z6Return true if the pathname refers to a symbolic link.rNrF) Carbon.FileFileZResolveAliasFile)r6Carbonr,r,r-r|s cCs(yt|}Wntk r"dSXdS)zCTest whether a path exists. Returns True for broken symbolic linksFT)oslstatOSError)r+str,r,r-rs cCs|S)zEDummy to retain interface-compatibility with other operating systems.r,)r+r,r,r-rscCs|S)zEDummy to retain interface-compatibility with other operating systems.r,)r+r,r,r-rsc@seZdZdZdS) norm_errorzPath cannot be normalizedN)r3 __module__ __qualname____doc__r,r,r,r-rPsrPcCst|}||kr||S||}d}x^|t|dkr||sz||drz|dkrp||d|d=|d}qtdq(|d}q(W||}|dd|krt|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 )r6r7compsrBr,r,r-rs      , cCs6t|s.t|trt}nt}t||}t|S)zReturn an absolute path.)r r)r*rLgetcwdbgetcwdr r)r+cwdr,r,r-rs    c Cst|}y ddl}Wntk r(|SX|s2|St|}||}|d|}xR|ddD]B}t||}y|j|dd}Wq^|jj k rYq^Xq^W|S)Nrr5) rrI ImportErrorr.r r rJZFSResolveAliasFileZ as_pathnameError)r+rKr7rGcr,r,r-r&s"     T)%rSrrr$r r!r"r#r%rLstatr;warningswarnDeprecationWarning__all__r.rr r r r rEr rrrHrrrr ExceptionrPrrr&r'r,r,r,r-sR