Your IP : 18.191.37.129


Current Path : /opt/alt/python34/lib64/python3.4/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/__pycache__/macpath.cpython-34.pyo

�
e f�� @s�dZddlZddlTddlZddlTdddddd	d
ddd
ddddddddddddddddddd d!d"d#g Zd$Zd%Zd&Zd$Zd'Z	d$Z
dZd(Zd)d*�Z
d+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�Zd=d"�Z d>Z!dS)?z7Pathname and path-related operations for the Macintosh.�N)�*�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_filenames�:z::�.�
zDev:NullcCst|t�rdSdSdS)N�:r#)�
isinstance�bytes)�path�r*�,/opt/alt/python34/lib64/python3.4/macpath.py�
_get_colonsr,cCs=t|ttf�s3tdj|jj���n|j�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)scGs�t|�}|}x�|D]�}|s2t|�r>|}qn|dd�|krg|dd�}n||kr�||}n|dd�|kr�||}n||}qW|S)Nr3���)r,r)r4�pr5r)�tr*r*r+r4s


cCs�t|�}||kr,|dd�|fSd}xAtt|��D]-}|||d�|krE|d}qEqEW|d|d�||d�}}|r�||kr�||}n||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.Nrr3)r,�range�len)r4r5�col�ir)�filer*r*r+rEs%
cCs?t|t�r%tj|dtd�Stj|ttt�SdS)Nr&�.)r'r(�genericpath�	_splitextrrr)r7r*r*r+rUscCs|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*)r7r*r*r+r\scCst|�dS)Nr)r)r4r*r*r+r
hscCst|�dS)Nr3)r)r4r*r*r+r	iscCs7t|�sdSt|�}t|�dko6|dS)NF�r3)rrr:)r4�
componentsr*r*r+�ismountksrCc	Cs:y'ddl}|jj|d�dSWndSYnXdS)z6Return true if the pathname refers to a symbolic link.rNrAF)�Carbon.File�FileZResolveAliasFile)r4�Carbonr*r*r+rqs
cCs0ytj|�}Wntk
r+dSYnXdS)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)r1�
__module__�__qualname__�__doc__r*r*r*r+rK�srKcCst|�}||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)zLNormalize a pathname.  Will return the same result for
    equivalent paths.r3z+Cannot use :: immediately after volume nameNrAr6r6)r,rr:rKr)r4r5�compsr<r*r*r+r�s 
>cCsRt|�sHt|t�r*tj�}ntj�}t||�}nt|�S)zReturn an absolute path.)rr'r(rG�getcwdb�getcwdrr)r)�cwdr*r*r+r�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)Nrr3)
rrD�ImportErrorr,rrrEZFSResolveAliasFileZas_pathname�Error)r)rFr5rB�cr*r*r+r!�s"
	#	T)"rNrG�statr?�__all__rrrrrrrr r,rrrrrr@rr
r	rCrrrr�	ExceptionrKrrr!r"r*r*r*r+�<module>sL

	

?>