o
    LK&h$#                     @  sh   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	mZmZ G dd	 d	eZdS )
z	Base API.    )annotationsN)ABCabstractmethod)Path)TYPE_CHECKING)IteratorLiteralc                   @  s  e Zd ZdZ							dmdnddZdoddZdpddZeedqddZ	eedqddZ
eedqddZeedqd d!Zeedqd"d#Zeedqd$d%Zeedqd&d'Zeedqd(d)Zeedqd*d+Zeedqd,d-Zeedqd.d/Zeedqd0d1Zeedqd2d3Zeedqd4d5Zeedqd6d7Zeedqd8d9Zedrd;d<Zedrd=d>Zedrd?d@ZedrdAdBZedrdCdDZedrdEdFZedrdGdHZedrdIdJZ edrdKdLZ!edrdMdNZ"edrdOdPZ#edrdQdRZ$edrdSdTZ%edrdUdVZ&edrdWdXZ'edrdYdZZ(dsd\d]Z)dsd^d_Z*dsd`daZ+dsdbdcZ,dtdedfZ-dtdgdhZ.dtdidjZ/dtdkdlZ0dS )uPlatformDirsABCz-Abstract base class for platform directories.NFTappname
str | None	appauthorstr | None | Literal[False]versionroamingbool	multipathopinionensure_existsreturnNonec                 C  s6   || _ || _	 || _	 || _	 || _	 || _|| _dS )aY  
        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   V/var/www/html/venv/lib/python3.10/site-packages/setuptools/_vendor/platformdirs/api.py__init__   s   zPlatformDirsABC.__init__basestrc                 G  sZ   t |dd  }| jr|| j | jr|| j tjj|d g|R  }| | |S )N   r   )listr
   appendr   ospathjoin_optionally_create_directory)r   r   paramsr    r   r   r   _append_app_name_and_versionP   s   
z,PlatformDirsABC._append_app_name_and_versionr    c                 C  s    | j rt|jddd d S d S )NT)parentsexist_ok)r   r   mkdirr   r    r   r   r   r"   Z   s   z,PlatformDirsABC._optionally_create_directoryc                 C     dS )z(:return: data directory tied to the userNr   r   r   r   r   user_data_dir^       zPlatformDirsABC.user_data_dirc                 C  r)   )z':return: data directory shared by usersNr   r*   r   r   r   site_data_dirc   r,   zPlatformDirsABC.site_data_dirc                 C  r)   )z*:return: config directory tied to the userNr   r*   r   r   r   user_config_dirh   r,   zPlatformDirsABC.user_config_dirc                 C  r)   )z-:return: config directory shared by the usersNr   r*   r   r   r   site_config_dirm   r,   zPlatformDirsABC.site_config_dirc                 C  r)   )z):return: cache directory tied to the userNr   r*   r   r   r   user_cache_dirr   r,   zPlatformDirsABC.user_cache_dirc                 C  r)   )z(:return: cache directory shared by usersNr   r*   r   r   r   site_cache_dirw   r,   zPlatformDirsABC.site_cache_dirc                 C  r)   )z):return: state directory tied to the userNr   r*   r   r   r   user_state_dir|   r,   zPlatformDirsABC.user_state_dirc                 C  r)   )z':return: log directory tied to the userNr   r*   r   r   r   user_log_dir   r,   zPlatformDirsABC.user_log_dirc                 C  r)   )z-:return: documents directory tied to the userNr   r*   r   r   r   user_documents_dir   r,   z"PlatformDirsABC.user_documents_dirc                 C  r)   )z-:return: downloads directory tied to the userNr   r*   r   r   r   user_downloads_dir   r,   z"PlatformDirsABC.user_downloads_dirc                 C  r)   )z,:return: pictures directory tied to the userNr   r*   r   r   r   user_pictures_dir   r,   z!PlatformDirsABC.user_pictures_dirc                 C  r)   )z*:return: videos directory tied to the userNr   r*   r   r   r   user_videos_dir   r,   zPlatformDirsABC.user_videos_dirc                 C  r)   )z):return: music directory tied to the userNr   r*   r   r   r   user_music_dir   r,   zPlatformDirsABC.user_music_dirc                 C  r)   )z+:return: desktop directory tied to the userNr   r*   r   r   r   user_desktop_dir   r,   z PlatformDirsABC.user_desktop_dirc                 C  r)   )z+:return: runtime directory tied to the userNr   r*   r   r   r   user_runtime_dir   r,   z PlatformDirsABC.user_runtime_dirc                 C  r)   )z*:return: runtime directory shared by usersNr   r*   r   r   r   site_runtime_dir   r,   z PlatformDirsABC.site_runtime_dirr   c                 C  
   t | jS )z#:return: data path tied to the user)r   r+   r*   r   r   r   user_data_path      
zPlatformDirsABC.user_data_pathc                 C  r<   )z":return: data path shared by users)r   r-   r*   r   r   r   site_data_path   r>   zPlatformDirsABC.site_data_pathc                 C  r<   )z%:return: config path tied to the user)r   r.   r*   r   r   r   user_config_path   r>   z PlatformDirsABC.user_config_pathc                 C  r<   )z(:return: config path shared by the users)r   r/   r*   r   r   r   site_config_path   r>   z PlatformDirsABC.site_config_pathc                 C  r<   )z$:return: cache path tied to the user)r   r0   r*   r   r   r   user_cache_path   r>   zPlatformDirsABC.user_cache_pathc                 C  r<   )z#:return: cache path shared by users)r   r1   r*   r   r   r   site_cache_path   r>   zPlatformDirsABC.site_cache_pathc                 C  r<   )z$:return: state path tied to the user)r   r2   r*   r   r   r   user_state_path   r>   zPlatformDirsABC.user_state_pathc                 C  r<   )z":return: log path tied to the user)r   r3   r*   r   r   r   user_log_path   r>   zPlatformDirsABC.user_log_pathc                 C  r<   )z*:return: documents a path tied to the user)r   r4   r*   r   r   r   user_documents_path   r>   z#PlatformDirsABC.user_documents_pathc                 C  r<   )z(:return: downloads path tied to the user)r   r5   r*   r   r   r   user_downloads_path   r>   z#PlatformDirsABC.user_downloads_pathc                 C  r<   )z':return: pictures path tied to the user)r   r6   r*   r   r   r   user_pictures_path   r>   z"PlatformDirsABC.user_pictures_pathc                 C  r<   )z%:return: videos path tied to the user)r   r7   r*   r   r   r   user_videos_path   r>   z PlatformDirsABC.user_videos_pathc                 C  r<   )z$:return: music path tied to the user)r   r8   r*   r   r   r   user_music_path   r>   zPlatformDirsABC.user_music_pathc                 C  r<   )z&:return: desktop path tied to the user)r   r9   r*   r   r   r   user_desktop_path   r>   z!PlatformDirsABC.user_desktop_pathc                 C  r<   )z&:return: runtime path tied to the user)r   r:   r*   r   r   r   user_runtime_path   r>   z!PlatformDirsABC.user_runtime_pathc                 C  r<   )z%:return: runtime path shared by users)r   r;   r*   r   r   r   site_runtime_path   r>   z!PlatformDirsABC.site_runtime_pathIterator[str]c                 c      | j V  | jV  dS )z4:yield: all user and site configuration directories.N)r.   r/   r*   r   r   r   iter_config_dirs      z PlatformDirsABC.iter_config_dirsc                 c  rO   )z+:yield: all user and site data directories.N)r+   r-   r*   r   r   r   iter_data_dirs  rQ   zPlatformDirsABC.iter_data_dirsc                 c  rO   )z,:yield: all user and site cache directories.N)r0   r1   r*   r   r   r   iter_cache_dirs  rQ   zPlatformDirsABC.iter_cache_dirsc                 c  rO   )z.:yield: all user and site runtime directories.N)r:   r;   r*   r   r   r   iter_runtime_dirs  rQ   z!PlatformDirsABC.iter_runtime_dirsIterator[Path]c                 c      |   D ]}t|V  qdS )z.:yield: all user and site configuration paths.N)rP   r   r(   r   r   r   iter_config_paths     z!PlatformDirsABC.iter_config_pathsc                 c  rV   )z%:yield: all user and site data paths.N)rR   r   r(   r   r   r   iter_data_paths  rX   zPlatformDirsABC.iter_data_pathsc                 c  rV   )z&:yield: all user and site cache paths.N)rS   r   r(   r   r   r   iter_cache_paths  rX   z PlatformDirsABC.iter_cache_pathsc                 c  rV   )z(:yield: all user and site runtime paths.N)rT   r   r(   r   r   r   iter_runtime_paths!  rX   z"PlatformDirsABC.iter_runtime_paths)NNNFFTF)r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   )r    r   r   r   )r   r   )r   r   )r   rN   )r   rU   )1__name__
__module____qualname____doc__r   r$   r"   propertyr   r+   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r=   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rP   rR   rS   rT   rW   rY   rZ   r[   r   r   r   r   r	      s    
?








r	   )r_   
__future__r   r   abcr   r   pathlibr   typingr   r   r   r	   r   r   r   r   <module>   s    