o
    \ig4                     @  sp   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
 d
eZdS )z	Base API.    )annotationsN)ABCabstractmethod)Path)TYPE_CHECKING)Iterator)Literalc                   @  s  e Zd ZdZ								ddddZdddZdddZdddZee	ddd Z
ee	dd!d"Zedd$d%Zee	dd&d'Zee	dd(d)Zedd*d+Zee	dd,d-Zee	dd.d/Zee	dd0d1Zee	dd2d3Zee	dd4d5Zee	dd6d7Zee	dd8d9Zee	dd:d;Zee	dd<d=Zee	dd>d?Zee	dd@dAZee	ddBdCZee	ddDdEZee	ddFdGZee	ddHdIZee	ddJdKZeddLdMZ ee	ddNdOZ!ee	ddPdQZ"eddRdSZ#eddTdUZ$eddVdWZ%eddXdYZ&eddZd[Z'edd\d]Z(edd^d_Z)edd`daZ*eddbdcZ+eddddeZ,eddfdgZ-eddhdiZ.eddjdkZ/eddldmZ0eddndoZ1eddpdqZ2eddrdsZ3eddtduZ4eddvdwZ5eddxdyZ6eddzd{Z7edd|d}Z8dddZ9dddZ:dddZ;dddZ<dddZ=dddZ>dddZ?dddZ@dddZAdddZBdddZCdddZDdS )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	           	      C  s@   || _ || _	 || _	 || _	 || _	 || _	 || _	 || _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    r   N/home/ubuntu/SoloSpeech/.venv/lib/python3.10/site-packages/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_versiong   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#   q   s   z,PlatformDirsABC._optionally_create_directory	directoryr   c                 C  s   | j r|tjd }t|S )Nr   )r   	partitionr    pathsepr   )r   r*   r   r   r    _first_item_as_path_if_multipathu   s   z0PlatformDirsABC._first_item_as_path_if_multipathc                 C     dS )z):returns: data directory tied to the userNr   r   r   r   r   user_data_dir{       zPlatformDirsABC.user_data_dirc                 C  r.   )z(:returns: data directory shared by usersNr   r/   r   r   r   site_data_dir   r1   zPlatformDirsABC.site_data_dir	list[str]c                 C     t NNotImplementedErrorr/   r   r   r   _site_data_dirs      zPlatformDirsABC._site_data_dirsc                 C  r.   )z+:returns: config directory tied to the userNr   r/   r   r   r   user_config_dir   r1   zPlatformDirsABC.user_config_dirc                 C  r.   )z*:returns: config directory shared by usersNr   r/   r   r   r   site_config_dir   r1   zPlatformDirsABC.site_config_dirc                 C  r4   r5   r6   r/   r   r   r   _site_config_dirs   r9   z!PlatformDirsABC._site_config_dirsc                 C  r.   )z*:returns: cache directory tied to the userNr   r/   r   r   r   user_cache_dir   r1   zPlatformDirsABC.user_cache_dirc                 C  r.   )z):returns: cache directory shared by usersNr   r/   r   r   r   site_cache_dir   r1   zPlatformDirsABC.site_cache_dirc                 C  r.   )z*:returns: state directory tied to the userNr   r/   r   r   r   user_state_dir   r1   zPlatformDirsABC.user_state_dirc                 C  r.   )z):returns: state directory shared by usersNr   r/   r   r   r   site_state_dir   r1   zPlatformDirsABC.site_state_dirc                 C  r.   )z(:returns: log directory tied to the userNr   r/   r   r   r   user_log_dir   r1   zPlatformDirsABC.user_log_dirc                 C  r.   )z':returns: log directory shared by usersNr   r/   r   r   r   site_log_dir   r1   zPlatformDirsABC.site_log_dirc                 C  r.   )z.:returns: documents directory tied to the userNr   r/   r   r   r   user_documents_dir   r1   z"PlatformDirsABC.user_documents_dirc                 C  r.   )z.:returns: downloads directory tied to the userNr   r/   r   r   r   user_downloads_dir   r1   z"PlatformDirsABC.user_downloads_dirc                 C  r.   )z-:returns: pictures directory tied to the userNr   r/   r   r   r   user_pictures_dir   r1   z!PlatformDirsABC.user_pictures_dirc                 C  r.   )z+:returns: videos directory tied to the userNr   r/   r   r   r   user_videos_dir   r1   zPlatformDirsABC.user_videos_dirc                 C  r.   )z*:returns: music directory tied to the userNr   r/   r   r   r   user_music_dir   r1   zPlatformDirsABC.user_music_dirc                 C  r.   )z,:returns: desktop directory tied to the userNr   r/   r   r   r   user_desktop_dir   r1   z PlatformDirsABC.user_desktop_dirc                 C  r.   )z(:returns: bin directory tied to the userNr   r/   r   r   r   user_bin_dir   r1   zPlatformDirsABC.user_bin_dirc                 C  r.   )z':returns: bin directory shared by usersNr   r/   r   r   r   site_bin_dir   r1   zPlatformDirsABC.site_bin_dirc                 C  r.   )z1:returns: applications directory tied to the userNr   r/   r   r   r   user_applications_dir   r1   z%PlatformDirsABC.user_applications_dirc                 C  r.   )z0:returns: applications directory shared by usersNr   r/   r   r   r   site_applications_dir   r1   z%PlatformDirsABC.site_applications_dirc                 C  r4   r5   r6   r/   r   r   r   _site_applications_dirs   r9   z'PlatformDirsABC._site_applications_dirsc                 C  r.   )z,:returns: runtime directory tied to the userNr   r/   r   r   r   user_runtime_dir   r1   z PlatformDirsABC.user_runtime_dirc                 C  r.   )z+:returns: runtime directory shared by usersNr   r/   r   r   r   site_runtime_dir   r1   z PlatformDirsABC.site_runtime_dirc                 C  
   t | jS )z$:returns: data path tied to the user)r   r0   r/   r   r   r   user_data_path      
zPlatformDirsABC.user_data_pathc                 C  rP   )z#:returns: data path shared by users)r   r2   r/   r   r   r   site_data_path   rR   zPlatformDirsABC.site_data_pathc                 C  rP   )z&:returns: config path tied to the user)r   r:   r/   r   r   r   user_config_path   rR   z PlatformDirsABC.user_config_pathc                 C  rP   )z%:returns: config path shared by users)r   r;   r/   r   r   r   site_config_path  rR   z PlatformDirsABC.site_config_pathc                 C  rP   )z%:returns: cache path tied to the user)r   r=   r/   r   r   r   user_cache_path	  rR   zPlatformDirsABC.user_cache_pathc                 C  rP   )z$:returns: cache path shared by users)r   r>   r/   r   r   r   site_cache_path  rR   zPlatformDirsABC.site_cache_pathc                 C  rP   )z%:returns: state path tied to the user)r   r?   r/   r   r   r   user_state_path  rR   zPlatformDirsABC.user_state_pathc                 C  rP   )z$:returns: state path shared by users)r   r@   r/   r   r   r   site_state_path  rR   zPlatformDirsABC.site_state_pathc                 C  rP   )z#:returns: log path tied to the user)r   rA   r/   r   r   r   user_log_path  rR   zPlatformDirsABC.user_log_pathc                 C  rP   )z":returns: log path shared by users)r   rB   r/   r   r   r   site_log_path"  rR   zPlatformDirsABC.site_log_pathc                 C  rP   )z):returns: documents path tied to the user)r   rC   r/   r   r   r   user_documents_path'  rR   z#PlatformDirsABC.user_documents_pathc                 C  rP   )z):returns: downloads path tied to the user)r   rD   r/   r   r   r   user_downloads_path,  rR   z#PlatformDirsABC.user_downloads_pathc                 C  rP   )z(:returns: pictures path tied to the user)r   rE   r/   r   r   r   user_pictures_path1  rR   z"PlatformDirsABC.user_pictures_pathc                 C  rP   )z&:returns: videos path tied to the user)r   rF   r/   r   r   r   user_videos_path6  rR   z PlatformDirsABC.user_videos_pathc                 C  rP   )z%:returns: music path tied to the user)r   rG   r/   r   r   r   user_music_path;  rR   zPlatformDirsABC.user_music_pathc                 C  rP   )z':returns: desktop path tied to the user)r   rH   r/   r   r   r   user_desktop_path@  rR   z!PlatformDirsABC.user_desktop_pathc                 C  rP   )z#:returns: bin path tied to the user)r   rI   r/   r   r   r   user_bin_pathE  rR   zPlatformDirsABC.user_bin_pathc                 C  rP   )z":returns: bin path shared by users)r   rJ   r/   r   r   r   site_bin_pathJ  rR   zPlatformDirsABC.site_bin_pathc                 C  rP   )z,:returns: applications path tied to the user)r   rK   r/   r   r   r   user_applications_pathO  rR   z&PlatformDirsABC.user_applications_pathc                 C  rP   )z+:returns: applications path shared by users)r   rL   r/   r   r   r   site_applications_pathT  rR   z&PlatformDirsABC.site_applications_pathc                 C  rP   )z':returns: runtime path tied to the user)r   rN   r/   r   r   r   user_runtime_pathY  rR   z!PlatformDirsABC.user_runtime_pathc                 C  rP   )z&:returns: runtime path shared by users)r   rO   r/   r   r   r   site_runtime_path^  rR   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_dirsc     z PlatformDirsABC.iter_config_dirsc                 c  ri   )z+:yield: all user and site data directories.N)r0   r2   r/   r   r   r   iter_data_dirsh  rk   zPlatformDirsABC.iter_data_dirsc                 c  ri   )z,:yield: all user and site cache directories.N)r=   r>   r/   r   r   r   iter_cache_dirsm  rk   zPlatformDirsABC.iter_cache_dirsc                 c  ri   )z,:yield: all user and site state directories.N)r?   r@   r/   r   r   r   iter_state_dirsr  rk   zPlatformDirsABC.iter_state_dirsc                 c  ri   )z*:yield: all user and site log directories.N)rA   rB   r/   r   r   r   iter_log_dirsw  rk   zPlatformDirsABC.iter_log_dirsc                 c  ri   )z.:yield: all user and site runtime directories.N)rN   rO   r/   r   r   r   iter_runtime_dirs|  rk   z!PlatformDirsABC.iter_runtime_dirsIterator[Path]c                 c      |   D ]}t|V  qdS )z.:yield: all user and site configuration paths.N)rj   r   r)   r   r   r   iter_config_paths     z!PlatformDirsABC.iter_config_pathsc                 c  rr   )z%:yield: all user and site data paths.N)rl   r   r)   r   r   r   iter_data_paths  rt   zPlatformDirsABC.iter_data_pathsc                 c  rr   )z&:yield: all user and site cache paths.N)rm   r   r)   r   r   r   iter_cache_paths  rt   z PlatformDirsABC.iter_cache_pathsc                 c  rr   )z&:yield: all user and site state paths.N)rn   r   r)   r   r   r   iter_state_paths  rt   z PlatformDirsABC.iter_state_pathsc                 c  rr   )z$:yield: all user and site log paths.N)ro   r   r)   r   r   r   iter_log_paths  rt   zPlatformDirsABC.iter_log_pathsc                 c  rr   )z(:yield: all user and site runtime paths.N)rp   r   r)   r   r   r   iter_runtime_paths  rt   z"PlatformDirsABC.iter_runtime_paths)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   r3   )r   r   )r   rh   )r   rq   )E__name__
__module____qualname____doc__r   r%   r#   r-   propertyr   r0   r2   r8   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rQ   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rj   rl   rm   rn   ro   rp   rs   ru   rv   rw   rx   ry   r   r   r   r   r	      s   

O













r	   )r}   
__future__r   r    abcr   r   pathlibr   typingr   collections.abcr   r   r	   r   r   r   r   <module>   s    