U
    g                     @   s   d dl mZ d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ G dd	 d	ed
ZG dd deZG dd deZdS )    )ABCMeta)abstractmethod)suppress)Path)Optional)AnyKey)keys_to_typingc                   @   s(   e Zd ZdZeeee dddZdS )FileDetectorzSUsed for identifying whether a sequence of chars represents the path to
    a file.keysreturnc                 G   s   t d S N)NotImplementedErrorselfr    r   K/tmp/pip-unpacked-wheel-3ysq0mf8/selenium/webdriver/remote/file_detector.pyis_local_file    s    zFileDetector.is_local_fileN)	__name__
__module____qualname____doc__r   r   r   strr   r   r   r   r   r	      s   r	   )	metaclassc                   @   s$   e Zd ZdZeee dddZdS )UselessFileDetectorz*A file detector that never finds anything.r
   c                 G   s   d S r   r   r   r   r   r   r   (   s    z!UselessFileDetector.is_local_fileNr   r   r   r   r   r   r   r   r   r   r   r   r   %   s   r   c                   @   s$   e Zd ZdZeee dddZdS )LocalFileDetectorz Detects files on the local disk.r
   c              
   G   sB   d t|}tt" t| r4|W  5 Q R  S W 5 Q R X d S )N )joinr   r   OSErrorr   is_file)r   r   	file_pathr   r   r   r   /   s
    
zLocalFileDetector.is_local_fileNr   r   r   r   r   r   ,   s   r   N)abcr   r   
contextlibr   pathlibr   typingr   Zselenium.typesr   Zselenium.webdriver.common.utilsr   r	   r   r   r   r   r   r   <module>   s   	