HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/platformdirs/__pycache__/api.cpython-310.pyc
o

j�hA$�@spdZddlmZddlZddlmZmZddlmZddl	m
Z
e
r.ddlmZddl	m
Z
Gd	d
�d
e�ZdS)z	Base API.�)�annotationsN)�ABC�abstractmethod)�Path)�
TYPE_CHECKING)�Iterator)�Literalc@s�eZdZdZ							dpdqdd�Zdrdd�Zdsdd�Zdtdd�Zee	dudd���Z
ee	dud d!���Zee	dud"d#���Zee	dud$d%���Z
ee	dud&d'���Zee	dud(d)���Zee	dud*d+���Zee	dud,d-���Zee	dud.d/���Zee	dud0d1���Zee	dud2d3���Zee	dud4d5���Zee	dud6d7���Zee	dud8d9���Zee	dud:d;���Zee	dud<d=���Zedvd>d?��Zedvd@dA��ZedvdBdC��ZedvdDdE��ZedvdFdG��ZedvdHdI��ZedvdJdK��Z edvdLdM��Z!edvdNdO��Z"edvdPdQ��Z#edvdRdS��Z$edvdTdU��Z%edvdVdW��Z&edvdXdY��Z'edvdZd[��Z(edvd\d]��Z)dwd_d`�Z*dwdadb�Z+dwdcdd�Z,dwdedf�Z-dxdhdi�Z.dxdjdk�Z/dxdldm�Z0dxdndo�Z1dS)y�PlatformDirsABCz-Abstract base class for platform directories.NFT�appname�
str | None�	appauthor�str | Literal[False] | None�version�roaming�bool�	multipath�opinion�
ensure_exists�return�NonecCs6||_||_	||_	||_	||_	||_||_dS)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rrrrr)�selfr
rrrrrr�r�;/usr/local/lib/python3.10/dist-packages/platformdirs/api.py�__init__szPlatformDirsABC.__init__�base�strcGsZt|dd��}|jr|�|j�|jr|�|j�tjj|dg|�R�}|�|�|S)N�r)�listr
�appendr�os�path�join�_optionally_create_directory)rr�paramsr rrr�_append_app_name_and_versionQs
z,PlatformDirsABC._append_app_name_and_versionr cCs |jrt|�jddd�dSdS)NT)�parents�exist_ok)rr�mkdir�rr rrrr"[s�z,PlatformDirsABC._optionally_create_directory�	directoryrcCs|jr|�tj�d}t|�S)Nr)r�	partitionr�pathsepr)rr)rrr� _first_item_as_path_if_multipath_sz0PlatformDirsABC._first_item_as_path_if_multipathcC�dS)z(:return: data directory tied to the userNr�rrrr�
user_data_dire�zPlatformDirsABC.user_data_dircCr-)z':return: data directory shared by usersNrr.rrr�
site_data_dirjr0zPlatformDirsABC.site_data_dircCr-)z*:return: config directory tied to the userNrr.rrr�user_config_diror0zPlatformDirsABC.user_config_dircCr-)z-:return: config directory shared by the usersNrr.rrr�site_config_dirtr0zPlatformDirsABC.site_config_dircCr-)z):return: cache directory tied to the userNrr.rrr�user_cache_diryr0zPlatformDirsABC.user_cache_dircCr-)z(:return: cache directory shared by usersNrr.rrr�site_cache_dir~r0zPlatformDirsABC.site_cache_dircCr-)z):return: state directory tied to the userNrr.rrr�user_state_dir�r0zPlatformDirsABC.user_state_dircCr-)z':return: log directory tied to the userNrr.rrr�user_log_dir�r0zPlatformDirsABC.user_log_dircCr-)z-:return: documents directory tied to the userNrr.rrr�user_documents_dir�r0z"PlatformDirsABC.user_documents_dircCr-)z-:return: downloads directory tied to the userNrr.rrr�user_downloads_dir�r0z"PlatformDirsABC.user_downloads_dircCr-)z,:return: pictures directory tied to the userNrr.rrr�user_pictures_dir�r0z!PlatformDirsABC.user_pictures_dircCr-)z*:return: videos directory tied to the userNrr.rrr�user_videos_dir�r0zPlatformDirsABC.user_videos_dircCr-)z):return: music directory tied to the userNrr.rrr�user_music_dir�r0zPlatformDirsABC.user_music_dircCr-)z+:return: desktop directory tied to the userNrr.rrr�user_desktop_dir�r0z PlatformDirsABC.user_desktop_dircCr-)z+:return: runtime directory tied to the userNrr.rrr�user_runtime_dir�r0z PlatformDirsABC.user_runtime_dircCr-)z*:return: runtime directory shared by usersNrr.rrr�site_runtime_dir�r0z PlatformDirsABC.site_runtime_dircC�
t|j�S)z#:return: data path tied to the user)rr/r.rrr�user_data_path��
zPlatformDirsABC.user_data_pathcCr@)z":return: data path shared by users)rr1r.rrr�site_data_path�rBzPlatformDirsABC.site_data_pathcCr@)z%:return: config path tied to the user)rr2r.rrr�user_config_path�rBz PlatformDirsABC.user_config_pathcCr@)z(:return: config path shared by the users)rr3r.rrr�site_config_path�rBz PlatformDirsABC.site_config_pathcCr@)z$:return: cache path tied to the user)rr4r.rrr�user_cache_path�rBzPlatformDirsABC.user_cache_pathcCr@)z#:return: cache path shared by users)rr5r.rrr�site_cache_path�rBzPlatformDirsABC.site_cache_pathcCr@)z$:return: state path tied to the user)rr6r.rrr�user_state_path�rBzPlatformDirsABC.user_state_pathcCr@)z":return: log path tied to the user)rr7r.rrr�
user_log_path�rBzPlatformDirsABC.user_log_pathcCr@)z*:return: documents a path tied to the user)rr8r.rrr�user_documents_path�rBz#PlatformDirsABC.user_documents_pathcCr@)z(:return: downloads path tied to the user)rr9r.rrr�user_downloads_path�rBz#PlatformDirsABC.user_downloads_pathcCr@)z':return: pictures path tied to the user)rr:r.rrr�user_pictures_path�rBz"PlatformDirsABC.user_pictures_pathcCr@)z%:return: videos path tied to the user)rr;r.rrr�user_videos_path�rBz PlatformDirsABC.user_videos_pathcCr@)z$:return: music path tied to the user)rr<r.rrr�user_music_path�rBzPlatformDirsABC.user_music_pathcCr@)z&:return: desktop path tied to the user)rr=r.rrr�user_desktop_path�rBz!PlatformDirsABC.user_desktop_pathcCr@)z&:return: runtime path tied to the user)rr>r.rrr�user_runtime_path�rBz!PlatformDirsABC.user_runtime_pathcCr@)z%:return: runtime path shared by users)rr?r.rrr�site_runtime_pathrBz!PlatformDirsABC.site_runtime_path�
Iterator[str]cc��|jV|jVdS)z4:yield: all user and site configuration directories.N)r2r3r.rrr�iter_config_dirs��z PlatformDirsABC.iter_config_dirsccrS)z+:yield: all user and site data directories.N)r/r1r.rrr�iter_data_dirs
rUzPlatformDirsABC.iter_data_dirsccrS)z,:yield: all user and site cache directories.N)r4r5r.rrr�iter_cache_dirsrUzPlatformDirsABC.iter_cache_dirsccrS)z.:yield: all user and site runtime directories.N)r>r?r.rrr�iter_runtime_dirsrUz!PlatformDirsABC.iter_runtime_dirs�Iterator[Path]cc��|��D]}t|�VqdS)z.:yield: all user and site configuration paths.N)rTrr(rrr�iter_config_paths���z!PlatformDirsABC.iter_config_pathsccrZ)z%:yield: all user and site data paths.N)rVrr(rrr�iter_data_pathsr\zPlatformDirsABC.iter_data_pathsccrZ)z&:yield: all user and site cache paths.N)rWrr(rrr�iter_cache_paths#r\z PlatformDirsABC.iter_cache_pathsccrZ)z(:yield: all user and site runtime paths.N)rXrr(rrr�iter_runtime_paths(r\z"PlatformDirsABC.iter_runtime_paths)NNNFFTF)r
rrr
rrrrrrrrrrrr)rrrr)r rrr)r)rrr)rr)rr)rrR)rrY)2�__name__�
__module__�__qualname__�__doc__rr$r"r,�propertyrr/r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?rArCrDrErFrGrHrIrJrKrLrMrNrOrPrQrTrVrWrXr[r]r^r_rrrrr	s��
?









r	)rc�
__future__rr�abcrr�pathlibr�typingr�collections.abcrrr	rrrr�<module>s