a
    xd                     @   sz   d dl 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 )    N)ABCMeta)abstractmethod)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   _/var/www/html/Ranjet/env/lib/python3.9/site-packages/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   sD   d t|}|sd S ztj|r*|W S W n ty>   Y n0 d S )N )joinr   ospathisfile	Exception)r   r	   	file_pathr   r   r   r   .   s    
zLocalFileDetector.is_local_fileNr   r   r   r   r   r   +   s   r   )r   abcr   r   typingr   Zselenium.typesr   Zselenium.webdriver.common.utilsr   r   r   r   r   r   r   r   <module>   s   	