o
    i1                     @  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e	dd#d$Zee	dd%d&Zee	dd'd(Zee	dd)d*Zee	dd+d,Zee	dd-d.Zee	dd/d0Zee	dd1d2Zee	dd3d4Zee	dd5d6Zee	dd7d8Zee	dd9d:Zee	dd;d<Zee	dd=d>Zee	dd?d@Zee	ddAdBZee	ddCdDZee	ddEdFZee	ddGdHZee	ddIdJZeddKdLZ eddMdNZ!eddOdPZ"eddQdRZ#eddSdTZ$eddUdVZ%eddWdXZ&eddYdZZ'edd[d\Z(edd]d^Z)edd_d`Z*eddadbZ+eddcddZ,eddedfZ-eddgdhZ.eddidjZ/eddkdlZ0eddmdnZ1eddodpZ2eddqdrZ3eddsdtZ4eddudvZ5ddxdyZ6ddzd{Z7dd|d}Z8dd~dZ9dddZ:dddZ;dddZ<dddZ=dddZ>dddZ?dddZ@dddZAd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/transcripts/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_version`   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#   j   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_multipathn   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_dirt       zPlatformDirsABC.user_data_dirc                 C  r.   )z(:returns: data directory shared by usersNr   r/   r   r   r   site_data_diry   r1   zPlatformDirsABC.site_data_dirc                 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  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  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  rG   )z#:returns: data path shared by users)r   r2   r/   r   r   r   site_data_path   rI   zPlatformDirsABC.site_data_pathc                 C  rG   )z&:returns: config path tied to the user)r   r3   r/   r   r   r   user_config_path   rI   z PlatformDirsABC.user_config_pathc                 C  rG   )z%:returns: config path shared by users)r   r4   r/   r   r   r   site_config_path   rI   z PlatformDirsABC.site_config_pathc                 C  rG   )z%:returns: cache path tied to the user)r   r5   r/   r   r   r   user_cache_path   rI   zPlatformDirsABC.user_cache_pathc                 C  rG   )z$:returns: cache path shared by users)r   r6   r/   r   r   r   site_cache_path   rI   zPlatformDirsABC.site_cache_pathc                 C  rG   )z%:returns: state path tied to the user)r   r7   r/   r   r   r   user_state_path   rI   zPlatformDirsABC.user_state_pathc                 C  rG   )z$:returns: state path shared by users)r   r8   r/   r   r   r   site_state_path  rI   zPlatformDirsABC.site_state_pathc                 C  rG   )z#:returns: log path tied to the user)r   r9   r/   r   r   r   user_log_path
  rI   zPlatformDirsABC.user_log_pathc                 C  rG   )z":returns: log path shared by users)r   r:   r/   r   r   r   site_log_path  rI   zPlatformDirsABC.site_log_pathc                 C  rG   )z):returns: documents path tied to the user)r   r;   r/   r   r   r   user_documents_path  rI   z#PlatformDirsABC.user_documents_pathc                 C  rG   )z):returns: downloads path tied to the user)r   r<   r/   r   r   r   user_downloads_path  rI   z#PlatformDirsABC.user_downloads_pathc                 C  rG   )z(:returns: pictures path tied to the user)r   r=   r/   r   r   r   user_pictures_path  rI   z"PlatformDirsABC.user_pictures_pathc                 C  rG   )z&:returns: videos path tied to the user)r   r>   r/   r   r   r   user_videos_path#  rI   z PlatformDirsABC.user_videos_pathc                 C  rG   )z%:returns: music path tied to the user)r   r?   r/   r   r   r   user_music_path(  rI   zPlatformDirsABC.user_music_pathc                 C  rG   )z':returns: desktop path tied to the user)r   r@   r/   r   r   r   user_desktop_path-  rI   z!PlatformDirsABC.user_desktop_pathc                 C  rG   )z#:returns: bin path tied to the user)r   rA   r/   r   r   r   user_bin_path2  rI   zPlatformDirsABC.user_bin_pathc                 C  rG   )z":returns: bin path shared by users)r   rB   r/   r   r   r   site_bin_path7  rI   zPlatformDirsABC.site_bin_pathc                 C  rG   )z,:returns: applications path tied to the user)r   rC   r/   r   r   r   user_applications_path<  rI   z&PlatformDirsABC.user_applications_pathc                 C  rG   )z+:returns: applications path shared by users)r   rD   r/   r   r   r   site_applications_pathA  rI   z&PlatformDirsABC.site_applications_pathc                 C  rG   )z':returns: runtime path tied to the user)r   rE   r/   r   r   r   user_runtime_pathF  rI   z!PlatformDirsABC.user_runtime_pathc                 C  rG   )z&:returns: runtime path shared by users)r   rF   r/   r   r   r   site_runtime_pathK  rI   z!PlatformDirsABC.site_runtime_pathIterator[str]c                 c      | j V  | jV  dS )z4:yield: all user and site configuration directories.N)r3   r4   r/   r   r   r   iter_config_dirsP     z PlatformDirsABC.iter_config_dirsc                 c  r`   )z+:yield: all user and site data directories.N)r0   r2   r/   r   r   r   iter_data_dirsU  rb   zPlatformDirsABC.iter_data_dirsc                 c  r`   )z,:yield: all user and site cache directories.N)r5   r6   r/   r   r   r   iter_cache_dirsZ  rb   zPlatformDirsABC.iter_cache_dirsc                 c  r`   )z,:yield: all user and site state directories.N)r7   r8   r/   r   r   r   iter_state_dirs_  rb   zPlatformDirsABC.iter_state_dirsc                 c  r`   )z*:yield: all user and site log directories.N)r9   r:   r/   r   r   r   iter_log_dirsd  rb   zPlatformDirsABC.iter_log_dirsc                 c  r`   )z.:yield: all user and site runtime directories.N)rE   rF   r/   r   r   r   iter_runtime_dirsi  rb   z!PlatformDirsABC.iter_runtime_dirsIterator[Path]c                 c      |   D ]}t|V  qdS )z.:yield: all user and site configuration paths.N)ra   r   r)   r   r   r   iter_config_pathsn     z!PlatformDirsABC.iter_config_pathsc                 c  ri   )z%:yield: all user and site data paths.N)rc   r   r)   r   r   r   iter_data_pathss  rk   zPlatformDirsABC.iter_data_pathsc                 c  ri   )z&:yield: all user and site cache paths.N)rd   r   r)   r   r   r   iter_cache_pathsx  rk   z PlatformDirsABC.iter_cache_pathsc                 c  ri   )z&:yield: all user and site state paths.N)re   r   r)   r   r   r   iter_state_paths}  rk   z PlatformDirsABC.iter_state_pathsc                 c  ri   )z$:yield: all user and site log paths.N)rf   r   r)   r   r   r   iter_log_paths  rk   zPlatformDirsABC.iter_log_pathsc                 c  ri   )z(:yield: all user and site runtime paths.N)rg   r   r)   r   r   r   iter_runtime_paths  rk   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   r   )r   r_   )r   rh   )B__name__
__module____qualname____doc__r   r%   r#   r-   propertyr   r0   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rH   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   ra   rc   rd   re   rf   rg   rj   rl   rm   rn   ro   rp   r   r   r   r   r	      s   

H


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