
    P'g                        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
r ddlZej                  dk\  rddl	mZ nddlmZ  G d	 d
e      Zy)z	Base API.    )annotationsN)ABCabstractmethod)Path)TYPE_CHECKING)      )Literalc                     e Zd ZdZ	 	 	 	 	 	 	 d"	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d#dZd$dZd%dZeed&d              Z	eed&d              Z
eed&d              Zeed&d	              Zeed&d
              Zeed&d              Zeed&d              Zeed&d              Zeed&d              Zeed&d              Zeed&d              Zeed&d              Zeed&d              Zeed&d              Zed'd       Zed'd       Zed'd       Zed'd       Zed'd       Zed'd       Zed'd       Zed'd       Zed'd       Zed'd       Z ed'd       Z!ed'd       Z"ed'd        Z#ed'd!       Z$y)(PlatformDirsABCz-Abstract base class for platform directories.Nc                n    || _         || _        	 || _        	 || _        	 || _        	 || _        || _        y)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)appname	appauthorversionroaming	multipathopinionensure_exists)selfr   r   r   r   r   r   r   s           T/var/www/html/knws/venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py__init__zPlatformDirsABC.__init__   sW    * "	 	 	
 #	 *	    c                &   t        |dd        }| j                  rB|j                  | j                         | j                  r|j                  | j                         t	        j
                  j                  |d   g| }| j                  |       |S )N   r   )listr   appendr   ospathjoin_optionally_create_directory)r   baseparamsr   s       r   _append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionG   sm    d12h<<MM$,,'||dll+ww||DG-f-))$/r   c                V    | j                   rt        |      j                  dd       y y )NT)parentsexist_ok)r   r   mkdir)r   r   s     r   r    z,PlatformDirsABC._optionally_create_directoryQ   s'    JTD9 r   c                     y)z(:return: data directory tied to the userN r   s    r   user_data_dirzPlatformDirsABC.user_data_dirU       r   c                     y)z':return: data directory shared by usersNr)   r*   s    r   site_data_dirzPlatformDirsABC.site_data_dirZ   r,   r   c                     y)z*:return: config directory tied to the userNr)   r*   s    r   user_config_dirzPlatformDirsABC.user_config_dir_   r,   r   c                     y)z-:return: config directory shared by the usersNr)   r*   s    r   site_config_dirzPlatformDirsABC.site_config_dird   r,   r   c                     y)z):return: cache directory tied to the userNr)   r*   s    r   user_cache_dirzPlatformDirsABC.user_cache_diri   r,   r   c                     y)z(:return: cache directory shared by usersNr)   r*   s    r   site_cache_dirzPlatformDirsABC.site_cache_dirn   r,   r   c                     y)z):return: state directory tied to the userNr)   r*   s    r   user_state_dirzPlatformDirsABC.user_state_dirs   r,   r   c                     y)z':return: log directory tied to the userNr)   r*   s    r   user_log_dirzPlatformDirsABC.user_log_dirx   r,   r   c                     y)z-:return: documents directory tied to the userNr)   r*   s    r   user_documents_dirz"PlatformDirsABC.user_documents_dir}   r,   r   c                     y)z-:return: downloads directory tied to the userNr)   r*   s    r   user_downloads_dirz"PlatformDirsABC.user_downloads_dir   r,   r   c                     y)z,:return: pictures directory tied to the userNr)   r*   s    r   user_pictures_dirz!PlatformDirsABC.user_pictures_dir   r,   r   c                     y)z*:return: videos directory tied to the userNr)   r*   s    r   user_videos_dirzPlatformDirsABC.user_videos_dir   r,   r   c                     y)z):return: music directory tied to the userNr)   r*   s    r   user_music_dirzPlatformDirsABC.user_music_dir   r,   r   c                     y)z+:return: runtime directory tied to the userNr)   r*   s    r   user_runtime_dirz PlatformDirsABC.user_runtime_dir   r,   r   c                ,    t        | j                        S )z#:return: data path tied to the user)r   r+   r*   s    r   user_data_pathzPlatformDirsABC.user_data_path        D&&''r   c                ,    t        | j                        S )z":return: data path shared by users)r   r.   r*   s    r   site_data_pathzPlatformDirsABC.site_data_path   rI   r   c                ,    t        | j                        S )z%:return: config path tied to the user)r   r0   r*   s    r   user_config_pathz PlatformDirsABC.user_config_path        D(())r   c                ,    t        | j                        S )z(:return: config path shared by the users)r   r2   r*   s    r   site_config_pathz PlatformDirsABC.site_config_path   rN   r   c                ,    t        | j                        S )z$:return: cache path tied to the user)r   r4   r*   s    r   user_cache_pathzPlatformDirsABC.user_cache_path        D''((r   c                ,    t        | j                        S )z#:return: cache path shared by users)r   r6   r*   s    r   site_cache_pathzPlatformDirsABC.site_cache_path   rS   r   c                ,    t        | j                        S )z$:return: state path tied to the user)r   r8   r*   s    r   user_state_pathzPlatformDirsABC.user_state_path   rS   r   c                ,    t        | j                        S )z":return: log path tied to the user)r   r:   r*   s    r   user_log_pathzPlatformDirsABC.user_log_path   s     D%%&&r   c                ,    t        | j                        S )z(:return: documents path tied to the user)r   r<   r*   s    r   user_documents_pathz#PlatformDirsABC.user_documents_path        D++,,r   c                ,    t        | j                        S )z(:return: downloads path tied to the user)r   r>   r*   s    r   user_downloads_pathz#PlatformDirsABC.user_downloads_path   r\   r   c                ,    t        | j                        S )z':return: pictures path tied to the user)r   r@   r*   s    r   user_pictures_pathz"PlatformDirsABC.user_pictures_path   s     D**++r   c                ,    t        | j                        S )z%:return: videos path tied to the user)r   rB   r*   s    r   user_videos_pathz PlatformDirsABC.user_videos_path   rN   r   c                ,    t        | j                        S )z$:return: music path tied to the user)r   rD   r*   s    r   user_music_pathzPlatformDirsABC.user_music_path   rS   r   c                ,    t        | j                        S )z&:return: runtime path tied to the user)r   rF   r*   s    r   user_runtime_pathz!PlatformDirsABC.user_runtime_path   s     D))**r   )NNNFFTF)r   
str | Noner   zstr | None | Literal[False]r   rg   r   boolr   rh   r   rh   r   rh   returnNone)r!   strri   rk   )r   rk   ri   rj   )ri   rk   )ri   r   )%__name__
__module____qualname____doc__r   r#   r    propertyr   r+   r.   r0   r2   r4   r6   r8   r:   r<   r>   r@   rB   rD   rF   rH   rK   rM   rP   rR   rU   rW   rY   r[   r^   r`   rb   rd   rf   r)   r   r   r   r      s   7 #15"#00 /0 	0
 0 0 0 0 
0d: 7  7 6  6 9  9 <  < 8  8 7  7 8  8 6  6 <  < <  < ;  ; 9  9 8  8 :  : ( ( ( ( * * * * ) ) ) ) ) ) ' ' - - - - , , * * ) ) + +r   r   )ro   
__future__r   r   abcr   r   pathlibr   typingr   sysversion_infor
   pip._vendor.typing_extensionsr   r)   r   r   <module>rx      s?     " 	 #   
6!"9M+c M+r   