ó zfc!@s¯dZddlZddlZddlTddlZddlTddlmZddddd d d d d ddddddddddddddddddd d!d"d#d$d%g!Zd&Zd'Zd(Z d&Z d)Z d&Z dZd*Zd+„Zd,„Zd-„Zd.„Zd/„Zejje_d0„Zd1„Zd2„Zd3„Zd4„Zd5„Zd6„Zd7„Zd8efd9„ƒYZd:„Z d;„Z!d<„Z"d=„Z#e$Z%dS(>s7Pathname and path-related operations for the Macintosh.iÿÿÿÿN(t*(t_unicodetnormcasetisabstjoint splitdrivetsplittsplitexttbasenametdirnamet commonprefixtgetsizetgetmtimetgetatimetgetctimetislinktexiststlexiststisdirtisfiletwalkt expandusert expandvarstnormpathtabspathtcurdirtpardirtseptpathseptdefpathtaltseptextseptdevnulltrealpathtsupports_unicode_filenamest:s::t.s sDev:NullcCs |jƒS(N(tlower(tpath((s/usr/lib64/python2.7/macpath.pyRscCsd|ko|ddkS(sø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).R#i((ts((s/usr/lib64/python2.7/macpath.pyR!scGs—|}xŠ|D]‚}| s&t|ƒr2|}q n|d dkrO|d}nd|krhd|}n|ddkr…|d}n||}q W|S(NiR#iÿÿÿÿ(R(R'tpR&tt((s/usr/lib64/python2.7/macpath.pyR+s     cCs˜d|krd|fSd}x7tt|ƒƒD]#}||dkr/|d}q/q/W||d ||}}|rŽd|krŽ|d}n||fS(sß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.R#tii(trangetlen(R'tcolontiR&tfile((s/usr/lib64/python2.7/macpath.pyR;s  cCstj|tttƒS(N(t genericpatht _splitextRRR(R(((s/usr/lib64/python2.7/macpath.pyRJscCs d|fS(s@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).R*((R(((s/usr/lib64/python2.7/macpath.pyRNscCst|ƒdS(Ni(R(R'((s/usr/lib64/python2.7/macpath.pyR ZR*cCst|ƒdS(Ni(R(R'((s/usr/lib64/python2.7/macpath.pyR[R*cCs<t|ƒstSt|ƒ}t|ƒdko;|ddkS(NiiR*(RtFalseRR,(R't components((s/usr/lib64/python2.7/macpath.pytismount]s  cCs6y'ddl}|jj|dƒdSWntSXdS(s6Return true if the pathname refers to a symbolic link.iÿÿÿÿNii(t Carbon.FiletFiletResolveAliasFileR2(R'tCarbon((s/usr/lib64/python2.7/macpath.pyRcs  cCs/ytj|ƒ}Wntjk r*tSXtS(sCTest whether a path exists. Returns True for broken symbolic links(tostlstatterrorR2tTrue(R&tst((s/usr/lib64/python2.7/macpath.pyRos cCs|S(sEDummy to retain interface-compatibility with other operating systems.((R&((s/usr/lib64/python2.7/macpath.pyRxscCs|S(sEDummy to retain interface-compatibility with other operating systems.((R&((s/usr/lib64/python2.7/macpath.pyR}st norm_errorcBseZdZRS(sPath cannot be normalized(t__name__t __module__t__doc__(((s/usr/lib64/python2.7/macpath.pyR>scCsd|krd|S|jdƒ}d}x|t|ƒdkrª||dkr||ddkr|dkr‘||d|d5|d}q§td‚q,|d}q,Wdj|ƒ}|ddkrÿt|ƒdkrÿ|dt|ƒkrÿ|d }n|S(sLNormalize a pathname. Will return the same result for equivalent paths.R#iR*s+Cannot use :: immediately after volume nameiÿÿÿÿi(RR,R>R(R'tcompsR.((s/usr/lib64/python2.7/macpath.pyR„s $   8 cCsžtjdddƒytj|ƒ}Wntjk r=dSX||||ƒxI|D]A}t||ƒ}t|ƒrUt|ƒ rUt|||ƒqUqUWdS(sIDirectory tree walk with callback function. For each directory in the directory tree rooted at top (including top itself, but excluding '.' and '..'), call func(arg, dirname, fnames). dirname is the name of the directory, and fnames a list of the names of the files and subdirectories in dirname (excluding '.' and '..'). func may modify the fnames list in-place (e.g. via del or slice assignment), and walk will only recurse into the subdirectories whose names remain in fnames; this can be used to implement a filter, or to impose a specific order of visiting. No semantics are defined for, or required of, arg, beyond that arg is always passed to func. It can be used, e.g., to pass a filename pattern, or a mutable object designed to accumulate statistics. Passing None for arg is common.s4In 3.x, os.path.walk is removed in favor of os.walk.t stackleveliN( twarningstwarnpy3kR9tlistdirR;RRRR(ttoptfunctargtnamestname((s/usr/lib64/python2.7/macpath.pyR s  cCsRt|ƒsHt|tƒr*tjƒ}n tjƒ}t||ƒ}nt|ƒS(sReturn an absolute path.(Rt isinstanceRR9tgetcwdutgetcwdRR(R&tcwd((s/usr/lib64/python2.7/macpath.pyR»s   cCs½t|ƒ}yddl}Wntk r0|SX|s;|S|jdƒ}|dd}x^|dD]R}t||ƒ}y#|jj|dƒdjƒ}Wqc|jjk r´qcXqcW|S(NiÿÿÿÿR#ii( RR5t ImportErrorRRR6tFSResolveAliasFilet as_pathnametError(R&R8R3tc((s/usr/lib64/python2.7/macpath.pyR!Æs   #(&RAR9RDtstatR0Rt__all__RRRRRRtNoneRR RRRRRR1RR RR4RRRRt ExceptionR>RRRR!R<R"(((s/usr/lib64/python2.7/macpath.pytsP