OwlCyberSecurity - MANAGER
Edit File: macpath.cpython-37.pyc
B ����� f���������������� ���@���sJ��d�Z�dZdZdZdZdZdZdZdZddl Z ddl T�ddlZddlT�ddlZej d ed d��dd ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+g Zd,d-��Zd.d��Zd/d ��Zd0d��Zd1d��Zd2d��Zejj�e_�d3d��Zd4d��Zd5d��Zd6d7��Zd8d��Zd9d��Zd:d��Zd;d��ZG�d<d=��d=e�Z d>d ��Z!d?d!��Z"d@d*��Z#dAZ$dS�)Bz7Pathname and path-related operations for the Macintosh.�:z::�.� NzDev:Null�����)�*zBthe macpath module is deprecated in 3.7 and will be removed in 3.8����)� stacklevel�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�rdS�dS�d�S�)N����:r���)� isinstance�bytes)�path��r,����,/opt/alt/python37/lib64/python3.7/macpath.py� _get_colon���s���� r.���c�������������C���s(���t�|�ttf�s td�|�jj���|����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�|��}||�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���������� ���G���s����y�t�|��}|�}|s"|d�d��|��xj|D�]b}|r8t|�r>|}q(|d�d��|krZ|dd���}||krj||�}|dd���|kr�||�}||�}q(W�|S��tttfk r����tjd|�f|������Y�nX�d�S�)Nr���r5������r ���)r.���r ���r0����AttributeError�BytesWarning�genericpath�_check_arg_types)r6����pr7���r+����tr,���r,���r-���r ���9���s(���� c�������������C���s����t�|��}||�kr |�dd��|�fS�d}x0tt|���D�] }|�||d���|kr2|d�}q2W�|�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.Nr���r5���)r.����range�len)r6���r7����col�ir+����filer,���r,���r-���r���P���s������c�������������C���s.���t�|�t�rt�|�dtd�S�t�|�ttt�S�d�S�)Nr(�������.)r)���r*���r;���� _splitextr#���r ���r$���)r=���r,���r,���r-���r ���`���s���� c�������������C���s���|�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).Nr���r,���)r=���r,���r,���r-���r���g���s����c�������������C���s���t�|��d�S�)Nr���)r���)r6���r,���r,���r-���r���s��������c�������������C���s���t�|��d�S�)Nr5���)r���)r6���r,���r,���r-���r���t���rF���c�������������C���s*���t�|��sdS�t|��}t|�dko(|d��S�)NFr���r5���)r ���r���r@���)r6���� componentsr,���r,���r-����ismountv���s����rH���c�������������C���s*���yddl�}|j�|�d�d�S����dS�dS�)z6Return true if the pathname refers to a symbolic link.r���Nr���F)�Carbon.File�FileZResolveAliasFile)r6����Carbonr,���r,���r-���r���|���s ����c�������������C���s(���yt��|��}W�n�tk r"���dS�X�dS�)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�Zd�ZdZdS�)� norm_errorzPath cannot be normalizedN)r3���� __module__�__qualname__�__doc__r,���r,���r,���r-���rP�������s���rP���c�������������C���s����t�|��}||�kr||��S�|��|�}d}x^|t|�d�k�r�||�sz||d��rz|dkrp||d�|d��=�|d�}q�td��q(|d�}q(W�|�|�}�|�dd��|kr�t|�dkr�|�|t|���kr�|�dd��}�|�S�)zLNormalize a pathname. Will return the same result for equivalent paths.r5���z+Cannot use :: immediately after volume namer8���Nr���)r.���r���r@���rP���r ���)r6���r7����compsrB���r,���r,���r-���r�������s ���� ,c�������������C���s6���t�|��s.t|�t�rt���}nt���}t||��}�t|��S�)zReturn an absolute path.)r ���r)���r*���rL����getcwdb�getcwdr ���r���)r+����cwdr,���r,���r-���r�������s���� c���������� ���C���s����t�|��}�ydd�l}W�n�tk r(���|�S�X�|�s2|�S�t|��}|��|�}|d�|�}�xR|dd���D�]B}t|�|�}�y|j�|�d�d����}�W�q^�|jj k r����Y�q^X�q^W�|�S�)Nr���r5���) r���rI����ImportErrorr.���r���r ���rJ���ZFSResolveAliasFileZas_pathname�Error)r+���rK���r7���rG����cr,���r,���r-���r&�������s"���� T)%rS���r���r���r$���r ���r!���r"���r#���r%���rL����statr;����warnings�warn�DeprecationWarning�__all__r.���r���r ���r ���r���r ���rE���r���r���r���rH���r���r���r���r���� ExceptionrP���r���r���r&���r'���r,���r,���r,���r-����<module>���sR���