B
    u9a”  ã               @   s–   d dl Z d dlZ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dd„ Z	dd„ Z
dd„ Zdd
„ Zdd„ Zdd„ Zdd„ ZdS )é    NÚcommonprefixÚexistsÚgetatimeÚgetctimeÚgetmtimeÚgetsizeÚisdirÚisfileÚsamefileÚsameopenfileÚsamestatc             C   s(   yt  | ¡ W n tk
r"   dS X dS )NFT)ÚosÚstatÚOSError)Úpath© r   ú!/usr/lib/python3.7/genericpath.pyr      s
    c             C   s0   yt  | ¡}W n tk
r"   dS X t |j¡S )NF)r   r   r   ÚS_ISREGÚst_mode)r   Ústr   r   r   r	      s
    c             C   s0   yt  | ¡}W n tk
r"   dS X t |j¡S )NF)r   r   r   ÚS_ISDIRr   )Úsr   r   r   r   r   '   s
    c             C   s   t  | ¡jS )N)r   r   Úst_size)Úfilenamer   r   r   r   0   s    c             C   s   t  | ¡jS )N)r   r   Úst_mtime)r   r   r   r   r   5   s    c             C   s   t  | ¡jS )N)r   r   Úst_atime)r   r   r   r   r   :   s    c             C   s   t  | ¡jS )N)r   r   Úst_ctime)r   r   r   r   r   ?   s    c             C   sl   | sdS t | d ttfƒs*tttj| ƒƒ} t| ƒ}t| ƒ}x,t|ƒD ] \}}||| krD|d |… S qDW |S )NÚ r   )	Ú
isinstanceÚlistÚtupleÚmapr   ÚfspathÚminÚmaxÚ	enumerate)ÚmÚs1Ús2ÚiÚcr   r   r   r   E   s     c             C   s   | j |j ko| j|jkS )N)Úst_inoÚst_dev)r'   r(   r   r   r   r   W   s    c             C   s   t  | ¡}t  |¡}t||ƒS )N)r   r   r   )Úf1Úf2r'   r(   r   r   r   r
   ^   s    

c             C   s   t  | ¡}t  |¡}t||ƒS )N)r   Úfstatr   )Úfp1Úfp2r'   r(   r   r   r   r   g   s    

c             C   sŽ   |   |¡}|r"|   |¡}t||ƒ}|   |¡}||kr~|d }x@||k r|| ||d … |krr| d |… | |d … fS |d7 }q>W | | d d… fS )Né   r   )Úrfindr$   )ÚpÚsepÚaltsepÚextsepÚsepIndexÚaltsepIndexÚdotIndexÚfilenameIndexr   r   r   Ú	_splitextu   s    




r<   c             G   sb   d }}xB|D ]:}t |tƒr"d}qt |tƒr2d}qtd| |jjf ƒd ‚qW |r^|r^tdƒd ‚d S )NFTz*%s() argument must be str or bytes, not %rz.Can't mix strings and bytes in path components)r   ÚstrÚbytesÚ	TypeErrorÚ	__class__Ú__name__)ÚfuncnameÚargsÚhasstrÚhasbytesr   r   r   r   Ú_check_arg_typesŒ   s    


rF   )r   r   Ú__all__r   r	   r   r   r   r   r   r   r   r
   r   r<   rF   r   r   r   r   Ú<module>   s"   

		