Current File : //usr/lib/python3/dist-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc
�

/�g����dZddlmZddlZddlmZmZddlmZddl	m
Z
e
r ddlZejdk\rddl	m
Z
nddlm
Z
Gd	�d
e�Zy)z	Base API.�)�annotationsN)�ABC�abstractmethod)�Path)�
TYPE_CHECKING)��)�Literalc���eZdZdZ							d"															d#d�Zd$d�Zd%d�Zeed&d���Z	eed&d���Z
eed&d���Zeed&d	���Zeed&d
���Z
eed&d���Zeed&d���Zeed&d
���Zeed&d���Zeed&d���Zeed&d���Zeed&d���Zeed&d���Zeed&d���Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Zed'd��Z ed'd��Z!ed'd��Z"ed'd ��Z#ed'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)�selfrrrrrrrs        �>/usr/lib/python3/dist-packages/pip/_vendor/platformdirs/api.py�__init__zPlatformDirsABC.__init__sW��*���"���	����	����	�
#���	����*���	�c�&�t|dd�}|jrB|j|j�|jr|j|j�t	j
j|dg|���}|j|�|S)N�r)�listr�appendr�os�path�join�_optionally_create_directory)r�base�paramsrs    r�_append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionGsm���d�1�2�h����<�<��M�M�$�,�,�'��|�|��
�
�d�l�l�+��w�w�|�|�D��G�-�f�-���)�)�$�/��rc�V�|jrt|�jdd��yy)NT)�parents�exist_ok)rr�mkdir)rrs  rr z,PlatformDirsABC._optionally_create_directoryQs'�������J���T�D��9�rc��y)z(:return: data directory tied to the userN��rs r�
user_data_dirzPlatformDirsABC.user_data_dirU��rc��y)z':return: data directory shared by usersNr)r*s r�
site_data_dirzPlatformDirsABC.site_data_dirZr,rc��y)z*:return: config directory tied to the userNr)r*s r�user_config_dirzPlatformDirsABC.user_config_dir_r,rc��y)z-:return: config directory shared by the usersNr)r*s r�site_config_dirzPlatformDirsABC.site_config_dirdr,rc��y)z):return: cache directory tied to the userNr)r*s r�user_cache_dirzPlatformDirsABC.user_cache_dirir,rc��y)z(:return: cache directory shared by usersNr)r*s r�site_cache_dirzPlatformDirsABC.site_cache_dirnr,rc��y)z):return: state directory tied to the userNr)r*s r�user_state_dirzPlatformDirsABC.user_state_dirsr,rc��y)z':return: log directory tied to the userNr)r*s r�user_log_dirzPlatformDirsABC.user_log_dirxr,rc��y)z-:return: documents directory tied to the userNr)r*s r�user_documents_dirz"PlatformDirsABC.user_documents_dir}r,rc��y)z-:return: downloads directory tied to the userNr)r*s r�user_downloads_dirz"PlatformDirsABC.user_downloads_dir�r,rc��y)z,:return: pictures directory tied to the userNr)r*s r�user_pictures_dirz!PlatformDirsABC.user_pictures_dir�r,rc��y)z*:return: videos directory tied to the userNr)r*s r�user_videos_dirzPlatformDirsABC.user_videos_dir�r,rc��y)z):return: music directory tied to the userNr)r*s r�user_music_dirzPlatformDirsABC.user_music_dir�r,rc��y)z+:return: runtime directory tied to the userNr)r*s r�user_runtime_dirz PlatformDirsABC.user_runtime_dir�r,rc�,�t|j�S)z#:return: data path tied to the user)rr+r*s r�user_data_pathzPlatformDirsABC.user_data_path�����D�&�&�'�'rc�,�t|j�S)z":return: data path shared by users)rr.r*s r�site_data_pathzPlatformDirsABC.site_data_path�rIrc�,�t|j�S)z%:return: config path tied to the user)rr0r*s r�user_config_pathz PlatformDirsABC.user_config_path�����D�(�(�)�)rc�,�t|j�S)z(:return: config path shared by the users)rr2r*s r�site_config_pathz PlatformDirsABC.site_config_path�rNrc�,�t|j�S)z$:return: cache path tied to the user)rr4r*s r�user_cache_pathzPlatformDirsABC.user_cache_path�����D�'�'�(�(rc�,�t|j�S)z#:return: cache path shared by users)rr6r*s r�site_cache_pathzPlatformDirsABC.site_cache_path�rSrc�,�t|j�S)z$:return: state path tied to the user)rr8r*s r�user_state_pathzPlatformDirsABC.user_state_path�rSrc�,�t|j�S)z":return: log path tied to the user)rr:r*s r�
user_log_pathzPlatformDirsABC.user_log_path�s���D�%�%�&�&rc�,�t|j�S)z(:return: documents path tied to the user)rr<r*s r�user_documents_pathz#PlatformDirsABC.user_documents_path�����D�+�+�,�,rc�,�t|j�S)z(:return: downloads path tied to the user)rr>r*s r�user_downloads_pathz#PlatformDirsABC.user_downloads_path�r\rc�,�t|j�S)z':return: pictures path tied to the user)rr@r*s r�user_pictures_pathz"PlatformDirsABC.user_pictures_path�s���D�*�*�+�+rc�,�t|j�S)z%:return: videos path tied to the user)rrBr*s r�user_videos_pathz PlatformDirsABC.user_videos_path�rNrc�,�t|j�S)z$:return: music path tied to the user)rrDr*s r�user_music_pathzPlatformDirsABC.user_music_path�rSrc�,�t|j�S)z&:return: runtime path tied to the user)rrFr*s r�user_runtime_pathz!PlatformDirsABC.user_runtime_path�s���D�)�)�*�*r)NNNFFTF)r�
str | Nonerzstr | None | Literal[False]rrgr�boolrrhrrhrrh�return�None)r!�strrirk)rrkrirj)rirk)rir)%�__name__�
__module__�__qualname__�__doc__rr#r �propertyrr+r.r0r2r4r6r8r:r<r>r@rBrDrFrHrKrMrPrRrUrWrYr[r^r`rbrdrfr)rrr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���:���:��(��(��(��(��*��*��*��*��)��)��)��)��)��)��'��'��-��-��-��-��,��,��*��*��)��)��+��+rr)ro�
__future__rr�abcrr�pathlibr�typingr�sys�version_infor
�pip._vendor.typing_extensionsrr)rr�<module>rxs?���"�	�#�� ���
���6�!�"�9�M+�c�M+r