ok

Mini Shell

Direktori : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/macpath.cpython-35.pyc



C�Ma� @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/python35/lib64/python3.5/macpath.py�
_get_colonsr,cCs:t|ttf�s0tdj|jj���|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c
Gs�y�t|�}|}|s-|dd�|x�|D]�}|sMt|�rV|}q4|dd�|kr||dd�}||kr�||}|dd�|kr�||}||}q4W|SWn1tttfk
r�tjd||��YnXdS)Nrr3r���)r,rr.�AttributeError�BytesWarning�genericpath�_check_arg_types)r4�pr5r)�tr*r*r+r4s(


cCs�t|�}||kr,|dd�|fSd}x>tt|��D]*}|||d�|krE|d}qEW|d|d�||d�}}|r�||kr�||}||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+rKs%
cCs?t|t�r%tj|dtd�Stj|ttt�SdS)Nr&�.)r'r(r9�	_splitextrrr)r;r*r*r+r[scCs|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+rbscCst|�dS)Nr)r)r4r*r*r+r
nscCst|�dS)Nr3)r)r4r*r*r+r	oscCs7t|�sdSt|�}t|�dko6|dS)NF�r3)rrr>)r4�
componentsr*r*r+�ismountqsrFc	Cs:y'ddl}|jj|d�dSWndSYnXdS)z6Return true if the pathname refers to a symbolic link.rNrDF)�Carbon.File�FileZResolveAliasFile)r4�Carbonr*r*r+rws
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+rN�srNcCst|�}||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�}|S)zLNormalize a pathname.  Will return the same result for
    equivalent paths.r3z+Cannot use :: immediately after volume nameNrDr6r6)r,rr>rNr)r4r5�compsr@r*r*r+r�s 
>cCsOt|�sEt|t�r*tj�}ntj�}t||�}t|�S)zReturn an absolute path.)rr'r(rJ�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)
rrG�ImportErrorr,rrrHZFSResolveAliasFileZas_pathname�Error)r)rIr5rE�cr*r*r+r!�s"
	#	T)"rQrJ�statr9�__all__rrrrrrrr r,rrrrrrCrr
r	rFrrrr�	ExceptionrNrrr!r"r*r*r*r+�<module>sL

	

Zerion Mini Shell 1.0