U
    ÏvagÜ  ã                   @  s„   d Z ddlmZ ddlZddlmZmZ ddlmZ ddl	m
Z
 e
rpddlZejdkrdddl	mZ nddlmZ G d	d
„ d
eƒZdS )z	Base API.é    )ÚannotationsN)ÚABCÚabstractmethod)ÚPath)ÚTYPE_CHECKING)é   é   )ÚLiteralc                
   @  s~  e Zd ZdZdMddddddddd	œd
d„Zdddœdd„Zdddœdd„Zeeddœdd„ƒƒZ	eeddœdd„ƒƒZ
eeddœdd„ƒƒZeeddœdd„ƒƒZeeddœdd„ƒƒZeeddœdd„ƒƒZeeddœd d!„ƒƒZeeddœd"d#„ƒƒZeeddœd$d%„ƒƒZeeddœd&d'„ƒƒZeeddœd(d)„ƒƒZeeddœd*d+„ƒƒZeeddœd,d-„ƒƒZeeddœd.d/„ƒƒZed0dœd1d2„ƒZed0dœd3d4„ƒZed0dœd5d6„ƒZed0dœd7d8„ƒZed0dœd9d:„ƒZed0dœd;d<„ƒZed0dœd=d>„ƒZed0dœd?d@„ƒZed0dœdAdB„ƒZed0dœdCdD„ƒZ ed0dœdEdF„ƒZ!ed0dœdGdH„ƒZ"ed0dœdIdJ„ƒZ#ed0dœdKdL„ƒZ$dS )NÚPlatformDirsABCz-Abstract base class for platform directories.NFTz
str | Nonezstr | None | Literal[False]ÚboolÚNone)ÚappnameÚ	appauthorÚversionÚroamingÚ	multipathÚopinionÚensure_existsÚreturnc                 C  s.   || _ || _|| _|| _|| _|| _|| _dS )aX  
        Create a new platform directory.

        :param appname: See `appname`.
        :param appauthor: See `appauthor`.
        :param version: See `version`.
        :param roaming: See `roaming`.
        :param multipath: See `multipath`.
        :param opinion: See `opinion`.
        :param ensure_exists: See `ensure_exists`.
        N)r   r   r   r   r   r   r   )Úselfr   r   r   r   r   r   r   © r   úP/var/www/html/myvenv/lib/python3.8/site-packages/pip/_vendor/platformdirs/api.pyÚ__init__   s    zPlatformDirsABC.__init__Ústr)Úbaser   c                 G  sX   t |dd … ƒ}| jr4| | j¡ | jr4| | j¡ tjj|d f|žŽ }|  |¡ |S )Né   r   )Úlistr   Úappendr   ÚosÚpathÚjoinÚ_optionally_create_directory)r   r   Úparamsr   r   r   r   Ú_append_app_name_and_versionG   s    
z,PlatformDirsABC._append_app_name_and_version)r   r   c                 C  s   | j rt|ƒjddd� d S )NT)ÚparentsÚexist_ok)r   r   Úmkdir)r   r   r   r   r   r!   Q   s    z,PlatformDirsABC._optionally_create_directory)r   c                 C  s   dS )z(:return: data directory tied to the userNr   ©r   r   r   r   Úuser_data_dirU   s    zPlatformDirsABC.user_data_dirc                 C  s   dS )z':return: data directory shared by usersNr   r'   r   r   r   Úsite_data_dirZ   s    zPlatformDirsABC.site_data_dirc                 C  s   dS )z*:return: config directory tied to the userNr   r'   r   r   r   Úuser_config_dir_   s    zPlatformDirsABC.user_config_dirc                 C  s   dS )z-:return: config directory shared by the usersNr   r'   r   r   r   Úsite_config_dird   s    zPlatformDirsABC.site_config_dirc                 C  s   dS )z):return: cache directory tied to the userNr   r'   r   r   r   Úuser_cache_diri   s    zPlatformDirsABC.user_cache_dirc                 C  s   dS )z(:return: cache directory shared by usersNr   r'   r   r   r   Úsite_cache_dirn   s    zPlatformDirsABC.site_cache_dirc                 C  s   dS )z):return: state directory tied to the userNr   r'   r   r   r   Úuser_state_dirs   s    zPlatformDirsABC.user_state_dirc                 C  s   dS )z':return: log directory tied to the userNr   r'   r   r   r   Úuser_log_dirx   s    zPlatformDirsABC.user_log_dirc                 C  s   dS )z-:return: documents directory tied to the userNr   r'   r   r   r   Úuser_documents_dir}   s    z"PlatformDirsABC.user_documents_dirc                 C  s   dS )z-:return: downloads directory tied to the userNr   r'   r   r   r   Úuser_downloads_dir‚   s    z"PlatformDirsABC.user_downloads_dirc                 C  s   dS )z,:return: pictures directory tied to the userNr   r'   r   r   r   Úuser_pictures_dir‡   s    z!PlatformDirsABC.user_pictures_dirc                 C  s   dS )z*:return: videos directory tied to the userNr   r'   r   r   r   Úuser_videos_dirŒ   s    zPlatformDirsABC.user_videos_dirc                 C  s   dS )z):return: music directory tied to the userNr   r'   r   r   r   Úuser_music_dir‘   s    zPlatformDirsABC.user_music_dirc                 C  s   dS )z+:return: runtime directory tied to the userNr   r'   r   r   r   Úuser_runtime_dir–   s    z PlatformDirsABC.user_runtime_dirr   c                 C  s
   t | jƒS )z#:return: data path tied to the user)r   r(   r'   r   r   r   Úuser_data_path›   s    zPlatformDirsABC.user_data_pathc                 C  s
   t | jƒS )z":return: data path shared by users)r   r)   r'   r   r   r   Úsite_data_path    s    zPlatformDirsABC.site_data_pathc                 C  s
   t | jƒS )z%:return: config path tied to the user)r   r*   r'   r   r   r   Úuser_config_path¥   s    z PlatformDirsABC.user_config_pathc                 C  s
   t | jƒS )z(:return: config path shared by the users)r   r+   r'   r   r   r   Úsite_config_pathª   s    z PlatformDirsABC.site_config_pathc                 C  s
   t | jƒS )z$:return: cache path tied to the user)r   r,   r'   r   r   r   Úuser_cache_path¯   s    zPlatformDirsABC.user_cache_pathc                 C  s
   t | jƒS )z#:return: cache path shared by users)r   r-   r'   r   r   r   Úsite_cache_path´   s    zPlatformDirsABC.site_cache_pathc                 C  s
   t | jƒS )z$:return: state path tied to the user)r   r.   r'   r   r   r   Úuser_state_path¹   s    zPlatformDirsABC.user_state_pathc                 C  s
   t | jƒS )z":return: log path tied to the user)r   r/   r'   r   r   r   Úuser_log_path¾   s    zPlatformDirsABC.user_log_pathc                 C  s
   t | jƒS )z(:return: documents path tied to the user)r   r0   r'   r   r   r   Úuser_documents_pathÃ   s    z#PlatformDirsABC.user_documents_pathc                 C  s
   t | jƒS )z(:return: downloads path tied to the user)r   r1   r'   r   r   r   Úuser_downloads_pathÈ   s    z#PlatformDirsABC.user_downloads_pathc                 C  s
   t | jƒS )z':return: pictures path tied to the user)r   r2   r'   r   r   r   Úuser_pictures_pathÍ   s    z"PlatformDirsABC.user_pictures_pathc                 C  s
   t | jƒS )z%:return: videos path tied to the user)r   r3   r'   r   r   r   Úuser_videos_pathÒ   s    z PlatformDirsABC.user_videos_pathc                 C  s
   t | jƒS )z$:return: music path tied to the user)r   r4   r'   r   r   r   Úuser_music_path×   s    zPlatformDirsABC.user_music_pathc                 C  s
   t | jƒS )z&:return: runtime path tied to the user)r   r5   r'   r   r   r   Úuser_runtime_pathÜ   s    z!PlatformDirsABC.user_runtime_path)NNNFFTF)%Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r!   Úpropertyr   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   r   r   r   r   r
      s¢          ø2
r
   )rG   Ú
__future__r   r   Úabcr   r   Úpathlibr   Útypingr   ÚsysÚversion_infor	   Úpip._vendor.typing_extensionsr
   r   r   r   r   Ú<module>   s   
