R`i d Z ddlmZ ddlZddlmZmZ ddlmZ ddl m Z e r ddlZej dk\ rddl m Z nddlm Z G d d e Zy)z Base API. )annotationsN)ABCabstractmethod)Path) TYPE_CHECKING) )Literalc e Zd ZdZ d" d#dZd$dZd%dZeed&d Z eed&d Z eed&d Zeed&d Zeed&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 appauthorversionroaming multipathopinion ensure_exists)selfr r r r r r r s /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py__init__zPlatformDirsABC.__init__ sW * " # * c & t |dd }| j rB|j | j | j r|j | j t j j |d g| }| j | |S )N r )listr appendr ospathjoin_optionally_create_directory)r baseparamsr s r _append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionG sm d12h<<MM$,,'|| dll+ww||DG-f-))$/r c V | j rt | j dd y y )NT)parentsexist_ok)r r mkdir)r r s r r z,PlatformDirsABC._optionally_create_directoryQ s' JTD9 r c y)z(:return: data directory tied to the userN r s r user_data_dirzPlatformDirsABC.user_data_dirU r c y)z':return: data directory shared by usersNr) r* s r site_data_dirzPlatformDirsABC.site_data_dirZ r, r c y)z*:return: config directory tied to the userNr) r* s r user_config_dirzPlatformDirsABC.user_config_dir_ r, r c y)z-:return: config directory shared by the usersNr) r* s r site_config_dirzPlatformDirsABC.site_config_dird r, r c y)z):return: cache directory tied to the userNr) r* s r user_cache_dirzPlatformDirsABC.user_cache_diri r, r c y)z(:return: cache directory shared by usersNr) r* s r site_cache_dirzPlatformDirsABC.site_cache_dirn r, r c y)z):return: state directory tied to the userNr) r* s r user_state_dirzPlatformDirsABC.user_state_dirs r, r c y)z':return: log directory tied to the userNr) r* s r user_log_dirzPlatformDirsABC.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_dirzPlatformDirsABC.user_videos_dir r, r c y)z):return: music directory tied to the userNr) r* s r user_music_dirzPlatformDirsABC.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_pathzPlatformDirsABC.user_data_path D&&''r c , t | j S )z":return: data path shared by users)r r. r* s r site_data_pathzPlatformDirsABC.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_pathzPlatformDirsABC.user_cache_path D''((r c , t | j S )z#:return: cache path shared by users)r r6 r* s r site_cache_pathzPlatformDirsABC.site_cache_path rS r c , t | j S )z$:return: state path tied to the user)r r8 r* s r user_state_pathzPlatformDirsABC.user_state_path rS r c , t | j S )z":return: log path tied to the user)r r: r* s r user_log_pathzPlatformDirsABC.user_log_path s D%%&&r c , t | j S )z(:return: documents path tied to the user)r r<