ž §’fńc @sĆdZddlZddlTddlZddlTdddddd d d d d ddddddddddddddddddd d!d"d#g Zd$Zd%Zd&Zd$Zd'Z d$Z dZ d(Z d)d*„Zd+d„Zd,d„Zd-d„Zd.d„Zd/d „Zejje_d0d„Zd1d „Zd2d „Zd3d4„Zd5d„Zd6d„Zd7d„Zd8d„ZGd9d:„d:eƒZd;d„Zd<d„Z d=d"„Z!d>Z#dS(?u7Pathname and path-related operations for the Macintosh.iN(u*unormcaseuisabsujoinu splitdriveusplitusplitextubasenameudirnameu commonprefixugetsizeugetmtimeugetatimeugetctimeuislinkuexistsulexistsuisdiruisfileu expanduseru expandvarsunormpathuabspathucurdirupardirusepupathsepudefpathualtsepuextsepudevnullurealpathusupports_unicode_filenamesu:u::u.u uDev:NullcCst|tƒrdSdSdS(Ns:u:(u isinstanceubytes(upath((u,/opt/alt/python33/lib64/python3.3/macpath.pyu _get_colonsu _get_coloncCs=t|ttfƒs3tdj|jjƒƒ‚n|jƒS(Nu2normcase() argument must be str or bytes, not '{}'(u isinstanceubytesustru TypeErroruformatu __class__u__name__ulower(upath((u,/opt/alt/python33/lib64/python3.3/macpath.pyunormcase"s cCs,t|ƒ}||ko+|dd…|kS(uų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).Ni(u _get_colon(usucolon((u,/opt/alt/python33/lib64/python3.3/macpath.pyuisabs)s cGsµt|ƒ}|}xœ|D]”}| s2t|ƒr>|}qn|dd…|krg|dd…}n||kr€||}n|dd…|kr£||}n||}qW|S(Nii’’’’(u _get_colonuisabs(usupucolonupathut((u,/opt/alt/python33/lib64/python3.3/macpath.pyujoin4s     cCsÄt|ƒ}||kr,|dd…|fSd}xAtt|ƒƒD]-}|||d…|krE|d}qEqEW|d|d…||d…}}|rŗ||krŗ||}n||fS(uß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.Nii(u _get_colonurangeulen(usucolonucoluiupathufile((u,/opt/alt/python33/lib64/python3.3/macpath.pyusplitEs  % cCs?t|tƒr%tj|dtdƒStj|tttƒSdS(Ns:s.(u isinstanceubytesu genericpathu _splitextualtsepusepuextsep(up((u,/opt/alt/python33/lib64/python3.3/macpath.pyusplitextUscCs|dd…|fS(u@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).Ni((up((u,/opt/alt/python33/lib64/python3.3/macpath.pyu splitdrive\scCst|ƒdS(Ni(usplit(us((u,/opt/alt/python33/lib64/python3.3/macpath.pyudirnamehscCst|ƒdS(Ni(usplit(us((u,/opt/alt/python33/lib64/python3.3/macpath.pyubasenameiscCs7t|ƒsdSt|ƒ}t|ƒdko6|d S(NiiF(uisabsuFalseusplitulen(usu components((u,/opt/alt/python33/lib64/python3.3/macpath.pyuismountks  uismountc Cs:y'ddl}|jj|dƒdSWn dSYnXdS(u6Return true if the pathname refers to a symbolic link.iNiF(u Carbon.FileuFileuResolveAliasFileuFalse(usuCarbon((u,/opt/alt/python33/lib64/python3.3/macpath.pyuislinkqs  c Cs3ytj|ƒ}Wntjk r.dSYnXdS(uCTest whether a path exists. Returns True for broken symbolic linksFT(uosulstatuerroruFalseuTrue(upathust((u,/opt/alt/python33/lib64/python3.3/macpath.pyulexists}s  cCs|S(uEDummy to retain interface-compatibility with other operating systems.((upath((u,/opt/alt/python33/lib64/python3.3/macpath.pyu expandvars†scCs|S(uEDummy to retain interface-compatibility with other operating systems.((upath((u,/opt/alt/python33/lib64/python3.3/macpath.pyu expanduser‹scBs|EeZdZdZdS(u norm_erroruPath cannot be normalizedN(u__name__u __module__u __qualname__u__doc__(u __locals__((u,/opt/alt/python33/lib64/python3.3/macpath.pyu norm_errorsu norm_errorcCst|ƒ}||kr ||S|j|ƒ}d}xz|t|ƒdkr±|| r¤||dr¤|dkr•||d|d…=|d}q®tdƒ‚q8|d}q8W|j|ƒ}|dd…|krt|ƒdkr||t|ƒkr|dd…}n|S(uLNormalize a pathname. Will return the same result for equivalent paths.iu+Cannot use :: immediately after volume nameNii’’’’i’’’’(u _get_colonusplitulenu norm_errorujoin(usucolonucompsui((u,/opt/alt/python33/lib64/python3.3/macpath.pyunormpath’s     >cCsRt|ƒsHt|tƒr*tjƒ}n tjƒ}t||ƒ}nt|ƒS(uReturn an absolute path.(uisabsu isinstanceubytesuosugetcwdbugetcwdujoinunormpath(upathucwd((u,/opt/alt/python33/lib64/python3.3/macpath.pyuabspathÆs   cCsŌt|ƒ}yddl}Wntk r4|SYnX|s?|St|ƒ}|j|ƒ}|d|}xe|dd…D]S}t||ƒ}y#|jj|dƒdjƒ}Wqy|jj k rĖYqyXqyW|S(Nii( uabspathu Carbon.Fileu ImportErroru _get_colonusplitujoinuFileuFSResolveAliasFileu as_pathnameuError(upathuCarbonucolonu componentsuc((u,/opt/alt/python33/lib64/python3.3/macpath.pyurealpathŗs"    # T($u__doc__uosustatu genericpathu__all__ucurdirupardiruextsepusepupathsepudefpathuNoneualtsepudevnullu _get_colonunormcaseuisabsujoinusplitusplitextu _splitextu splitdriveudirnameubasenameuismountuislinkulexistsu expandvarsu expanduseru Exceptionu norm_errorunormpathuabspathurealpathuTrueusupports_unicode_filenames(((u,/opt/alt/python33/lib64/python3.3/macpath.pyusL