
    Jj':                    ~    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 ddl	mZ  G d	 d
e          ZdS )z	Base API.    )annotationsN)ABCabstractmethod)Path)TYPE_CHECKING)Iterator)Literalc                     e Zd ZdZ	 	 	 	 	 	 	 	 dcdddZdedZdfdZdgdZee	dhd                        Z
ee	dhd                        Zedid            Zee	dhd                        Zee	dhd                         Zedid!            Zee	dhd"                        Zee	dhd#                        Zee	dhd$                        Zee	dhd%                        Zee	dhd&                        Zee	dhd'                        Zee	dhd(                        Zee	dhd)                        Zee	dhd*                        Zee	dhd+                        Zee	dhd,                        Zee	dhd-                        Zee	dhd.                        Zee	dhd/                        Zee	dhd0                        Zee	dhd1                        Zee	dhd2                        Z ee	dhd3                        Z!ee	dhd4                        Z"ee	dhd5                        Z#ee	dhd6                        Z$edid7            Z%ee	dhd8                        Z&ee	dhd9                        Z'edjd:            Z(edjd;            Z)edjd<            Z*edjd=            Z+edjd>            Z,edjd?            Z-edjd@            Z.edjdA            Z/edjdB            Z0edjdC            Z1edjdD            Z2edjdE            Z3edjdF            Z4edjdG            Z5edjdH            Z6edjdI            Z7edjdJ            Z8edjdK            Z9edjdL            Z:edjdM            Z;edjdN            Z<edjdO            Z=edjdP            Z>edjdQ            Z?edjdR            Z@edjdS            ZAedjdT            ZBdkdVZCdkdWZDdkdXZEdkdYZFdkdZZGdkd[ZHdld]ZIdld^ZJdld_ZKdld`ZLdldaZMdldbZNdS )mPlatformDirsABCav  Abstract base class defining all platform directory properties, their :class:`~pathlib.Path` variants, and iterators.

    Platform-specific subclasses (e.g. :class:`~platformdirs.windows.Windows`, :class:`~platformdirs.macos.MacOS`,
    :class:`~platformdirs.unix.Unix`) implement the abstract properties to return the appropriate paths for each
    operating system.

    NFTappname
str | None	appauthorstr | Literal[False] | Noneversionroamingbool	multipathopinionensure_existsuse_site_for_rootreturnNonec	                    || _         || _        	 || _        	 || _        	 || _        	 || _        	 || _        	 || _        dS )a  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`.
        :param use_site_for_root: See `use_site_for_root`.

        N)r   r   r   r   r   r   r   r   )	selfr   r   r   r   r   r   r   r   s	            d/home/rurouni/.cache/uv/archive-v0/6mr0qdqUAO9GXgnL/lib/python3.11/site-packages/platformdirs/api.py__init__zPlatformDirsABC.__init__   sr    . "	 	 	 #	 	 +	
 "3	 	    basestrc                   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%   s       r   _append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versiong   s    d122h< 	,MM$,'''| ,dl+++w|DG-f---))$///r   r%   c                `    | j         r&t          |                              dd           d S d S )NT)parentsexist_ok)r   r   mkdirr   r%   s     r   r'   z,PlatformDirsABC._optionally_create_directoryq   s<     	:JJTD99999	: 	:r   	directoryr   c                x    | j         r%|                    t          j                  d         }t	          |          S )Nr   )r   	partitionr$   pathsepr   )r   r/   s     r    _first_item_as_path_if_multipathz0PlatformDirsABC._first_item_as_path_if_multipathu   s2    > 	;!++BJ77:IIr   c                    dS )z):returns: data directory tied to the userN r   s    r   user_data_dirzPlatformDirsABC.user_data_dir{         r   c                    dS )z(:returns: data directory shared by usersNr5   r6   s    r   site_data_dirzPlatformDirsABC.site_data_dir   r8   r   	list[str]c                    t           NNotImplementedErrorr6   s    r   _site_data_dirszPlatformDirsABC._site_data_dirs       !!r   c                    dS )z+:returns: config directory tied to the userNr5   r6   s    r   user_config_dirzPlatformDirsABC.user_config_dir   r8   r   c                    dS )z*:returns: config directory shared by usersNr5   r6   s    r   site_config_dirzPlatformDirsABC.site_config_dir   r8   r   c                    t           r=   r>   r6   s    r   _site_config_dirsz!PlatformDirsABC._site_config_dirs   rA   r   c                    dS )z*:returns: cache directory tied to the userNr5   r6   s    r   user_cache_dirzPlatformDirsABC.user_cache_dir   r8   r   c                    dS )z):returns: cache directory shared by usersNr5   r6   s    r   site_cache_dirzPlatformDirsABC.site_cache_dir   r8   r   c                    dS )z*:returns: state directory tied to the userNr5   r6   s    r   user_state_dirzPlatformDirsABC.user_state_dir   r8   r   c                    dS )z):returns: state directory shared by usersNr5   r6   s    r   site_state_dirzPlatformDirsABC.site_state_dir   r8   r   c                    dS )z(:returns: log directory tied to the userNr5   r6   s    r   user_log_dirzPlatformDirsABC.user_log_dir   r8   r   c                    dS )z':returns: log directory shared by usersNr5   r6   s    r   site_log_dirzPlatformDirsABC.site_log_dir   r8   r   c                    dS )z.:returns: documents directory tied to the userNr5   r6   s    r   user_documents_dirz"PlatformDirsABC.user_documents_dir   r8   r   c                    dS )z.:returns: downloads directory tied to the userNr5   r6   s    r   user_downloads_dirz"PlatformDirsABC.user_downloads_dir   r8   r   c                    dS )z-:returns: pictures directory tied to the userNr5   r6   s    r   user_pictures_dirz!PlatformDirsABC.user_pictures_dir   r8   r   c                    dS )z+:returns: videos directory tied to the userNr5   r6   s    r   user_videos_dirzPlatformDirsABC.user_videos_dir   r8   r   c                    dS )z*:returns: music directory tied to the userNr5   r6   s    r   user_music_dirzPlatformDirsABC.user_music_dir   r8   r   c                    dS )z,:returns: desktop directory tied to the userNr5   r6   s    r   user_desktop_dirz PlatformDirsABC.user_desktop_dir   r8   r   c                    dS )z-:returns: projects directory tied to the userNr5   r6   s    r   user_projects_dirz!PlatformDirsABC.user_projects_dir   r8   r   c                    dS )z1:returns: public share directory tied to the userNr5   r6   s    r   user_publicshare_dirz$PlatformDirsABC.user_publicshare_dir   r8   r   c                    dS )z.:returns: templates directory tied to the userNr5   r6   s    r   user_templates_dirz"PlatformDirsABC.user_templates_dir   r8   r   c                    dS )z*:returns: fonts directory tied to the userNr5   r6   s    r   user_fonts_dirzPlatformDirsABC.user_fonts_dir   r8   r   c                    dS )z/:returns: preference directory tied to the userNr5   r6   s    r   user_preference_dirz#PlatformDirsABC.user_preference_dir   r8   r   c                    dS )z(:returns: bin directory tied to the userNr5   r6   s    r   user_bin_dirzPlatformDirsABC.user_bin_dir   r8   r   c                    dS )z':returns: bin directory shared by usersNr5   r6   s    r   site_bin_dirzPlatformDirsABC.site_bin_dir   r8   r   c                    dS )z1:returns: applications directory tied to the userNr5   r6   s    r   user_applications_dirz%PlatformDirsABC.user_applications_dir   r8   r   c                    dS )z0:returns: applications directory shared by usersNr5   r6   s    r   site_applications_dirz%PlatformDirsABC.site_applications_dir   r8   r   c                    t           r=   r>   r6   s    r   _site_applications_dirsz'PlatformDirsABC._site_applications_dirs   rA   r   c                    dS )z,:returns: runtime directory tied to the userNr5   r6   s    r   user_runtime_dirz PlatformDirsABC.user_runtime_dir  r8   r   c                    dS )z+:returns: runtime directory shared by usersNr5   r6   s    r   site_runtime_dirz PlatformDirsABC.site_runtime_dir	  r8   r   c                *    t          | j                  S )z$:returns: data path tied to the user)r   r7   r6   s    r   user_data_pathzPlatformDirsABC.user_data_path       D&'''r   c                *    t          | j                  S )z#:returns: data path shared by users)r   r:   r6   s    r   site_data_pathzPlatformDirsABC.site_data_path  rz   r   c                *    t          | j                  S )z&:returns: config path tied to the user)r   rC   r6   s    r   user_config_pathz PlatformDirsABC.user_config_path       D()))r   c                *    t          | j                  S )z%:returns: config path shared by users)r   rE   r6   s    r   site_config_pathz PlatformDirsABC.site_config_path  r   r   c                *    t          | j                  S )z%:returns: cache path tied to the user)r   rI   r6   s    r   user_cache_pathzPlatformDirsABC.user_cache_path"       D'(((r   c                *    t          | j                  S )z$:returns: cache path shared by users)r   rK   r6   s    r   site_cache_pathzPlatformDirsABC.site_cache_path'  r   r   c                *    t          | j                  S )z%:returns: state path tied to the user)r   rM   r6   s    r   user_state_pathzPlatformDirsABC.user_state_path,  r   r   c                *    t          | j                  S )z$:returns: state path shared by users)r   rO   r6   s    r   site_state_pathzPlatformDirsABC.site_state_path1  r   r   c                *    t          | j                  S )z#:returns: log path tied to the user)r   rQ   r6   s    r   user_log_pathzPlatformDirsABC.user_log_path6       D%&&&r   c                *    t          | j                  S )z":returns: log path shared by users)r   rS   r6   s    r   site_log_pathzPlatformDirsABC.site_log_path;  r   r   c                *    t          | j                  S )z):returns: documents path tied to the user)r   rU   r6   s    r   user_documents_pathz#PlatformDirsABC.user_documents_path@       D+,,,r   c                *    t          | j                  S )z):returns: downloads path tied to the user)r   rW   r6   s    r   user_downloads_pathz#PlatformDirsABC.user_downloads_pathE  r   r   c                *    t          | j                  S )z(:returns: pictures path tied to the user)r   rY   r6   s    r   user_pictures_pathz"PlatformDirsABC.user_pictures_pathJ       D*+++r   c                *    t          | j                  S )z&:returns: videos path tied to the user)r   r[   r6   s    r   user_videos_pathz PlatformDirsABC.user_videos_pathO  r   r   c                *    t          | j                  S )z%:returns: music path tied to the user)r   r]   r6   s    r   user_music_pathzPlatformDirsABC.user_music_pathT  r   r   c                *    t          | j                  S )z':returns: desktop path tied to the user)r   r_   r6   s    r   user_desktop_pathz!PlatformDirsABC.user_desktop_pathY       D)***r   c                *    t          | j                  S )z(:returns: projects path tied to the user)r   ra   r6   s    r   user_projects_pathz"PlatformDirsABC.user_projects_path^  r   r   c                *    t          | j                  S )z,:returns: public share path tied to the user)r   rc   r6   s    r   user_publicshare_pathz%PlatformDirsABC.user_publicshare_pathc  s     D-...r   c                *    t          | j                  S )z):returns: templates path tied to the user)r   re   r6   s    r   user_templates_pathz#PlatformDirsABC.user_templates_pathh  r   r   c                *    t          | j                  S )z%:returns: fonts path tied to the user)r   rg   r6   s    r   user_fonts_pathzPlatformDirsABC.user_fonts_pathm  r   r   c                *    t          | j                  S )z*:returns: preference path tied to the user)r   ri   r6   s    r   user_preference_pathz$PlatformDirsABC.user_preference_pathr  s     D,---r   c                *    t          | j                  S )z#:returns: bin path tied to the user)r   rk   r6   s    r   user_bin_pathzPlatformDirsABC.user_bin_pathw  r   r   c                *    t          | j                  S )z":returns: bin path shared by users)r   rm   r6   s    r   site_bin_pathzPlatformDirsABC.site_bin_path|  r   r   c                *    t          | j                  S )z,:returns: applications path tied to the user)r   ro   r6   s    r   user_applications_pathz&PlatformDirsABC.user_applications_path       D.///r   c                *    t          | j                  S )z+:returns: applications path shared by users)r   rq   r6   s    r   site_applications_pathz&PlatformDirsABC.site_applications_path  r   r   c                *    t          | j                  S )z':returns: runtime path tied to the user)r   ru   r6   s    r   user_runtime_pathz!PlatformDirsABC.user_runtime_path  r   r   c                *    t          | j                  S )z&:returns: runtime path shared by users)r   rw   r6   s    r   site_runtime_pathz!PlatformDirsABC.site_runtime_path  r   r   Iterator[str]c              #  .   K   | j         V  | j        V  dS )z4:yield: all user and site configuration directories.N)rC   rE   r6   s    r   iter_config_dirsz PlatformDirsABC.iter_config_dirs  s*      """"""""""r   c              #  .   K   | j         V  | j        V  dS )z+:yield: all user and site data directories.N)r7   r:   r6   s    r   iter_data_dirszPlatformDirsABC.iter_data_dirs  s*                r   c              #  .   K   | j         V  | j        V  dS )z,:yield: all user and site cache directories.N)rI   rK   r6   s    r   iter_cache_dirszPlatformDirsABC.iter_cache_dirs  *      !!!!!!!!!!r   c              #  .   K   | j         V  | j        V  dS )z,:yield: all user and site state directories.N)rM   rO   r6   s    r   iter_state_dirszPlatformDirsABC.iter_state_dirs  r   r   c              #  .   K   | j         V  | j        V  dS )z*:yield: all user and site log directories.N)rQ   rS   r6   s    r   iter_log_dirszPlatformDirsABC.iter_log_dirs  s*      r   c              #  .   K   | j         V  | j        V  dS )z.:yield: all user and site runtime directories.N)ru   rw   r6   s    r   iter_runtime_dirsz!PlatformDirsABC.iter_runtime_dirs  s*      ##########r   Iterator[Path]c              #  Z   K   |                                  D ]}t          |          V  dS )z.:yield: all user and site configuration paths.N)r   r   r.   s     r   iter_config_pathsz!PlatformDirsABC.iter_config_paths  s@      ))++ 	 	Dt**	 	r   c              #  Z   K   |                                  D ]}t          |          V  dS )z%:yield: all user and site data paths.N)r   r   r.   s     r   iter_data_pathszPlatformDirsABC.iter_data_paths  s@      '')) 	 	Dt**	 	r   c              #  Z   K   |                                  D ]}t          |          V  dS )z&:yield: all user and site cache paths.N)r   r   r.   s     r   iter_cache_pathsz PlatformDirsABC.iter_cache_paths  @      ((** 	 	Dt**	 	r   c              #  Z   K   |                                  D ]}t          |          V  dS )z&:yield: all user and site state paths.N)r   r   r.   s     r   iter_state_pathsz PlatformDirsABC.iter_state_paths  r   r   c              #  Z   K   |                                  D ]}t          |          V  dS )z$:yield: all user and site log paths.N)r   r   r.   s     r   iter_log_pathszPlatformDirsABC.iter_log_paths  s@      &&(( 	 	Dt**	 	r   c              #  Z   K   |                                  D ]}t          |          V  dS )z(:yield: all user and site runtime paths.N)r   r   r.   s     r   iter_runtime_pathsz"PlatformDirsABC.iter_runtime_paths  s@      **,, 	 	Dt**	 	r   )NNNFFTFF)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   r   )r   r   )r   r;   )r   r   )r   r   )r   r   )O__name__
__module____qualname____doc__r   r)   r'   r3   propertyr   r7   r:   r@   rC   rE   rG   rI   rK   rM   rO   rQ   rS   rU   rW   rY   r[   r]   r_   ra   rc   re   rg   ri   rk   rm   ro   rq   rs   ru   rw   ry   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   r   r   r   r   r   r   r   r   r   r5   r   r   r   r      s	         #15"#"'M M M M M^   : : : :    8 8 8 ^ X8 7 7 7 ^ X7 " " " X" : : : ^ X: 9 9 9 ^ X9 " " " X" 9 9 9 ^ X9 8 8 8 ^ X8 9 9 9 ^ X9 8 8 8 ^ X8 7 7 7 ^ X7 6 6 6 ^ X6 = = = ^ X= = = = ^ X= < < < ^ X< : : : ^ X: 9 9 9 ^ X9 ; ; ; ^ X; < < < ^ X< @ @ @ ^ X@ = = = ^ X= 9 9 9 ^ X9 > > > ^ X> 7 7 7 ^ X7 6 6 6 ^ X6 @ @ @ ^ X@ ? ? ? ^ X? " " " X" ; ; ; ^ X; : : : ^ X: ( ( ( X( ( ( ( X( * * * X* * * * X* ) ) ) X) ) ) ) X) ) ) ) X) ) ) ) X) ' ' ' X' ' ' ' X' - - - X- - - - X- , , , X, * * * X* ) ) ) X) + + + X+ , , , X, / / / X/ - - - X- ) ) ) X) . . . X. ' ' ' X' ' ' ' X' 0 0 0 X0 0 0 0 X0 + + + X+ + + + X+# # # #
! ! ! !
" " " "
" " " "
       
$ $ $ $
   
   
   
   
   
     r   r   )r   
__future__r   r$   abcr   r   pathlibr   typingr   collections.abcr   r	   r   r5   r   r   <module>r      s     " " " " " " 				 # # # # # # # #                   ((((((@ @ @ @ @c @ @ @ @ @r   