
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3

  \S  ã                @   s2  d Z dZdZdZdZdZdZdZdZddl	Z	ddl
T ddlZddlT d	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(g Zd)d*„ Zd+d	„ Zd,d
„ Zd-d„ Zd.d„ Zd/d„ Zejj e_ d0d„ Zd1d„ Zd2d„ Zd3d4„ Zd5d„ Zd6d„ Zd7d„ Zd8d„ ZG d9d:„ d:eƒZd;d„ Zd<d„ Zd=d'„ Z d>Z!dS )?z7Pathname and path-related operations for the Macintosh.ú:z::Ú.Ú
NzDev:Nullé    )Ú*Ú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_filenamesc             C   s   t | tƒrdS dS d S )Nó   :r   )Ú
isinstanceÚbytes)Úpath© r*   ú/usr/lib64/python3.6/macpath.pyÚ
_get_colon   s    
r,   c             C   s(   t | ttfƒs tdj| jjƒƒ‚| jƒ S )Nz2normcase() argument must be str or bytes, not '{}')r'   r(   ÚstrÚ	TypeErrorÚformatÚ	__class__Ú__name__Úlower)r)   r*   r*   r+   r   #   s    c             C   s    t | ƒ}|| ko| dd… |kS )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   *   s    c             G   sÆ   y’t | ƒ}| }|s"|d d… |  xl|D ]d}| s:t|ƒr@|}q(|d d… |kr\|dd … }||krl|| }|dd … |kr„|| }|| }q(W |S  tttfk
rÀ   tjd| f|žŽ  ‚ Y nX d S )Nr   r3   r   éÿÿÿÿ)r,   r   r.   ÚAttributeErrorÚBytesWarningÚgenericpathÚ_check_arg_types)r4   Úpr5   r)   Útr*   r*   r+   r   5   s(    
c             C   s�   t | ƒ}|| kr | dd… | fS d}x0tt| ƒƒD ] }| ||d … |kr2|d }q2W | d|d … | |d…  }}|rˆ||krˆ|| }||fS )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.Nr   r3   )r,   ÚrangeÚlen)r4   r5   ÚcolÚir)   Úfiler*   r*   r+   r
   L   s      c             C   s.   t | tƒrtj| dtdƒS tj| tttƒS d S )Nr&   ó   .)r'   r(   r9   Ú	_splitextr!   r   r"   )r;   r*   r*   r+   r   \   s    
c             C   s   | dd… | fS )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).Nr   r*   )r;   r*   r*   r+   r	   c   s    c             C   s   t | ƒd S )Nr   )r
   )r4   r*   r*   r+   r   o   s    c             C   s   t | ƒd S )Nr3   )r
   )r4   r*   r*   r+   r   p   s    c             C   s*   t | ƒsdS t| ƒ}t|ƒdko(|d  S )NFé   r3   )r   r
   r>   )r4   Ú
componentsr*   r*   r+   Úismountr   s    rF   c          	   C   s*   yddl }|jj| dƒd S    dS dS )z6Return true if the pathname refers to a symbolic link.r   NrD   F)ÚCarbon.FileÚFileZResolveAliasFile)r4   ÚCarbonr*   r*   r+   r   x   s
    c             C   s(   yt j| ƒ}W n tk
r"   dS X dS )zCTest whether a path exists.  Returns True for broken symbolic linksFT)ÚosÚlstatÚOSError)r)   Ústr*   r*   r+   r   „   s
    c             C   s   | S )zEDummy to retain interface-compatibility with other operating systems.r*   )r)   r*   r*   r+   r   �   s    c             C   s   | S )zEDummy to retain interface-compatibility with other operating systems.r*   )r)   r*   r*   r+   r   ’   s    c               @   s   e Zd ZdZdS )Ú
norm_errorzPath cannot be normalizedN)r1   Ú
__module__Ú__qualname__Ú__doc__r*   r*   r*   r+   rN   –   s   rN   c             C   sÎ   t | ƒ}|| kr||  S | j|ƒ}d}x`|t|ƒd k r†||  r|||d  r||dkrr||d |d …= |d }q„tdƒ‚q(|d }q(W |j|ƒ} | dd… |krÊt|ƒdkrÊ| |t| ƒ krÊ| dd… } | S )zLNormalize a pathname.  Will return the same result for
    equivalent paths.r3   z+Cannot use :: immediately after volume nameNrD   r6   r6   )r,   r
   r>   rN   r   )r4   r5   Úcompsr@   r*   r*   r+   r   ™   s     



,c             C   s6   t | ƒs.t| tƒrtjƒ }ntjƒ }t|| ƒ} t| ƒS )zReturn an absolute path.)r   r'   r(   rJ   ÚgetcwdbÚgetcwdr   r   )r)   Úcwdr*   r*   r+   r   ¶   s    


c             C   s¨   t | ƒ} ydd l}W n tk
r(   | S X | s2| S t| ƒ}| j|ƒ}|d | } xR|dd … D ]B}t| |ƒ} y|jj| dƒd jƒ } W q^ |jj	k
rž   Y q^X q^W | S )Nr   r3   )
r   rG   ÚImportErrorr,   r
   r   rH   ZFSResolveAliasFileZas_pathnameÚError)r)   rI   r5   rE   Úcr*   r*   r+   r$   Á   s"    


T)"rQ   r   r   r"   r   r   r    r!   r#   rJ   Ústatr9   Ú__all__r,   r   r   r   r
   r   rC   r	   r   r   rF   r   r   r   r   Ú	ExceptionrN   r   r   r$   r%   r*   r*   r*   r+   Ú<module>   sL   


	