
    ˷i1                        S r SSKJr  SSKrSSKJrJr  SSKJr  SSK	J
r
  \
(       a  SSKJr  SSK	Jr   " S	 S
\5      rg)z	Base API.    )annotationsN)ABCabstractmethod)Path)TYPE_CHECKING)Iterator)Literalc                  :   \ rS rSrSr        SA                 SBS jjrSCS jrSDS jrSES jr\	\
SFS j5       5       r\	\
SFS	 j5       5       r\	\
SFS
 j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r\	\
SFS j5       5       r \	SGS j5       r!\	SGS j5       r"\	SGS  j5       r#\	SGS! j5       r$\	SGS" j5       r%\	SGS# j5       r&\	SGS$ j5       r'\	SGS% j5       r(\	SGS& j5       r)\	SGS' j5       r*\	SGS( j5       r+\	SGS) j5       r,\	SGS* j5       r-\	SGS+ j5       r.\	SGS, j5       r/\	SGS- j5       r0\	SGS. j5       r1\	SGS/ j5       r2\	SGS0 j5       r3\	SGS1 j5       r4\	SGS2 j5       r5\	SGS3 j5       r6SHS4 jr7SHS5 jr8SHS6 jr9SHS7 jr:SHS8 jr;SHS9 jr<SIS: jr=SIS; jr>SIS< jr?SIS= jr@SIS> jrASIS? jrBS@rCg)JPlatformDirsABC   af  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.

Nc	                p    Xl         X l         X0l         X@l         XPl         X`l         Xpl         Xl        g)aC  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)appname	appauthorversionroaming	multipathopinionensure_existsuse_site_for_root)	selfr   r   r   r   r   r   r   r   s	            0lib/python3.13/site-packages/platformdirs/api.py__init__PlatformDirsABC.__init__   s]    . "	
 	 	 #	 	 +	
 "3	    c                <   [        USS  5      nU R                  (       aG  UR                  U R                  5        U R                  (       a  UR                  U R                  5        [        R
                  R                  " US   /UQ76 nU R                  U5        U$ )N   r   )listr   appendr   ospathjoin_optionally_create_directory)r   baseparamsr    s       r   _append_app_name_and_version,PlatformDirsABC._append_app_name_and_version`   sm    d12h<<MM$,,'||dll+ww||DG-f-))$/r   c                Z    U R                   (       a  [        U5      R                  SSS9  g g )NT)parentsexist_ok)r   r   mkdirr   r    s     r   r"   ,PlatformDirsABC._optionally_create_directoryj   s'    JTD9 r   c                ~    U R                   (       a"  UR                  [        R                  5      S   n[	        U5      $ )Nr   )r   	partitionr   pathsepr   )r   	directorys     r    _first_item_as_path_if_multipath0PlatformDirsABC._first_item_as_path_if_multipathn   s,    >>!++BJJ7:IIr   c                    g)z):returns: data directory tied to the userN r   s    r   user_data_dirPlatformDirsABC.user_data_dirt       r   c                    g)z(:returns: data directory shared by usersNr4   r5   s    r   site_data_dirPlatformDirsABC.site_data_diry   r8   r   c                    g)z+:returns: config directory tied to the userNr4   r5   s    r   user_config_dirPlatformDirsABC.user_config_dir~   r8   r   c                    g)z*:returns: config directory shared by usersNr4   r5   s    r   site_config_dirPlatformDirsABC.site_config_dir   r8   r   c                    g)z*:returns: cache directory tied to the userNr4   r5   s    r   user_cache_dirPlatformDirsABC.user_cache_dir   r8   r   c                    g)z):returns: cache directory shared by usersNr4   r5   s    r   site_cache_dirPlatformDirsABC.site_cache_dir   r8   r   c                    g)z*:returns: state directory tied to the userNr4   r5   s    r   user_state_dirPlatformDirsABC.user_state_dir   r8   r   c                    g)z):returns: state directory shared by usersNr4   r5   s    r   site_state_dirPlatformDirsABC.site_state_dir   r8   r   c                    g)z(:returns: log directory tied to the userNr4   r5   s    r   user_log_dirPlatformDirsABC.user_log_dir   r8   r   c                    g)z':returns: log directory shared by usersNr4   r5   s    r   site_log_dirPlatformDirsABC.site_log_dir   r8   r   c                    g)z.:returns: documents directory tied to the userNr4   r5   s    r   user_documents_dir"PlatformDirsABC.user_documents_dir   r8   r   c                    g)z.:returns: downloads directory tied to the userNr4   r5   s    r   user_downloads_dir"PlatformDirsABC.user_downloads_dir   r8   r   c                    g)z-:returns: pictures directory tied to the userNr4   r5   s    r   user_pictures_dir!PlatformDirsABC.user_pictures_dir   r8   r   c                    g)z+:returns: videos directory tied to the userNr4   r5   s    r   user_videos_dirPlatformDirsABC.user_videos_dir   r8   r   c                    g)z*:returns: music directory tied to the userNr4   r5   s    r   user_music_dirPlatformDirsABC.user_music_dir   r8   r   c                    g)z,:returns: desktop directory tied to the userNr4   r5   s    r   user_desktop_dir PlatformDirsABC.user_desktop_dir   r8   r   c                    g)z(:returns: bin directory tied to the userNr4   r5   s    r   user_bin_dirPlatformDirsABC.user_bin_dir   r8   r   c                    g)z':returns: bin directory shared by usersNr4   r5   s    r   site_bin_dirPlatformDirsABC.site_bin_dir   r8   r   c                    g)z1:returns: applications directory tied to the userNr4   r5   s    r   user_applications_dir%PlatformDirsABC.user_applications_dir   r8   r   c                    g)z0:returns: applications directory shared by usersNr4   r5   s    r   site_applications_dir%PlatformDirsABC.site_applications_dir   r8   r   c                    g)z,:returns: runtime directory tied to the userNr4   r5   s    r   user_runtime_dir PlatformDirsABC.user_runtime_dir   r8   r   c                    g)z+:returns: runtime directory shared by usersNr4   r5   s    r   site_runtime_dir PlatformDirsABC.site_runtime_dir   r8   r   c                ,    [        U R                  5      $ )z$:returns: data path tied to the user)r   r6   r5   s    r   user_data_pathPlatformDirsABC.user_data_path        D&&''r   c                ,    [        U R                  5      $ )z#:returns: data path shared by users)r   r:   r5   s    r   site_data_pathPlatformDirsABC.site_data_path   r{   r   c                ,    [        U R                  5      $ )z&:returns: config path tied to the user)r   r=   r5   s    r   user_config_path PlatformDirsABC.user_config_path        D(())r   c                ,    [        U R                  5      $ )z%:returns: config path shared by users)r   r@   r5   s    r   site_config_path PlatformDirsABC.site_config_path   r   r   c                ,    [        U R                  5      $ )z%:returns: cache path tied to the user)r   rC   r5   s    r   user_cache_pathPlatformDirsABC.user_cache_path        D''((r   c                ,    [        U R                  5      $ )z$:returns: cache path shared by users)r   rF   r5   s    r   site_cache_pathPlatformDirsABC.site_cache_path   r   r   c                ,    [        U R                  5      $ )z%:returns: state path tied to the user)r   rI   r5   s    r   user_state_pathPlatformDirsABC.user_state_path   r   r   c                ,    [        U R                  5      $ )z$:returns: state path shared by users)r   rL   r5   s    r   site_state_pathPlatformDirsABC.site_state_path  r   r   c                ,    [        U R                  5      $ )z#:returns: log path tied to the user)r   rO   r5   s    r   user_log_pathPlatformDirsABC.user_log_path
       D%%&&r   c                ,    [        U R                  5      $ )z":returns: log path shared by users)r   rR   r5   s    r   site_log_pathPlatformDirsABC.site_log_path  r   r   c                ,    [        U R                  5      $ )z):returns: documents path tied to the user)r   rU   r5   s    r   user_documents_path#PlatformDirsABC.user_documents_path       D++,,r   c                ,    [        U R                  5      $ )z):returns: downloads path tied to the user)r   rX   r5   s    r   user_downloads_path#PlatformDirsABC.user_downloads_path  r   r   c                ,    [        U R                  5      $ )z(:returns: pictures path tied to the user)r   r[   r5   s    r   user_pictures_path"PlatformDirsABC.user_pictures_path  s     D**++r   c                ,    [        U R                  5      $ )z&:returns: videos path tied to the user)r   r^   r5   s    r   user_videos_path PlatformDirsABC.user_videos_path#  r   r   c                ,    [        U R                  5      $ )z%:returns: music path tied to the user)r   ra   r5   s    r   user_music_pathPlatformDirsABC.user_music_path(  r   r   c                ,    [        U R                  5      $ )z':returns: desktop path tied to the user)r   rd   r5   s    r   user_desktop_path!PlatformDirsABC.user_desktop_path-       D))**r   c                ,    [        U R                  5      $ )z#:returns: bin path tied to the user)r   rg   r5   s    r   user_bin_pathPlatformDirsABC.user_bin_path2  r   r   c                ,    [        U R                  5      $ )z":returns: bin path shared by users)r   rj   r5   s    r   site_bin_pathPlatformDirsABC.site_bin_path7  r   r   c                ,    [        U R                  5      $ )z,:returns: applications path tied to the user)r   rm   r5   s    r   user_applications_path&PlatformDirsABC.user_applications_path<       D..//r   c                ,    [        U R                  5      $ )z+:returns: applications path shared by users)r   rp   r5   s    r   site_applications_path&PlatformDirsABC.site_applications_pathA  r   r   c                ,    [        U R                  5      $ )z':returns: runtime path tied to the user)r   rs   r5   s    r   user_runtime_path!PlatformDirsABC.user_runtime_pathF  r   r   c                ,    [        U R                  5      $ )z&:returns: runtime path shared by users)r   rv   r5   s    r   site_runtime_path!PlatformDirsABC.site_runtime_pathK  r   r   c              #  D   #    U R                   v   U R                  v   g7f)z4:yield: all user and site configuration directories.N)r=   r@   r5   s    r   iter_config_dirs PlatformDirsABC.iter_config_dirsP  s     """"""    c              #  D   #    U R                   v   U R                  v   g7f)z+:yield: all user and site data directories.N)r6   r:   r5   s    r   iter_data_dirsPlatformDirsABC.iter_data_dirsU  s           r   c              #  D   #    U R                   v   U R                  v   g7f)z,:yield: all user and site cache directories.N)rC   rF   r5   s    r   iter_cache_dirsPlatformDirsABC.iter_cache_dirsZ       !!!!!!r   c              #  D   #    U R                   v   U R                  v   g7f)z,:yield: all user and site state directories.N)rI   rL   r5   s    r   iter_state_dirsPlatformDirsABC.iter_state_dirs_  r   r   c              #  D   #    U R                   v   U R                  v   g7f)z*:yield: all user and site log directories.N)rO   rR   r5   s    r   iter_log_dirsPlatformDirsABC.iter_log_dirsd  s     r   c              #  D   #    U R                   v   U R                  v   g7f)z.:yield: all user and site runtime directories.N)rs   rv   r5   s    r   iter_runtime_dirs!PlatformDirsABC.iter_runtime_dirsi  s     ######r   c              #  T   #    U R                  5        H  n[        U5      v   M     g7f)z.:yield: all user and site configuration paths.N)r   r   r+   s     r   iter_config_paths!PlatformDirsABC.iter_config_pathsn  s"     ))+Dt* ,   &(c              #  T   #    U R                  5        H  n[        U5      v   M     g7f)z%:yield: all user and site data paths.N)r   r   r+   s     r   iter_data_pathsPlatformDirsABC.iter_data_pathss  s"     '')Dt* *r   c              #  T   #    U R                  5        H  n[        U5      v   M     g7f)z&:yield: all user and site cache paths.N)r   r   r+   s     r   iter_cache_paths PlatformDirsABC.iter_cache_pathsx  "     ((*Dt* +r   c              #  T   #    U R                  5        H  n[        U5      v   M     g7f)z&:yield: all user and site state paths.N)r   r   r+   s     r   iter_state_paths PlatformDirsABC.iter_state_paths}  r   r   c              #  T   #    U R                  5        H  n[        U5      v   M     g7f)z$:yield: all user and site log paths.N)r   r   r+   s     r   iter_log_pathsPlatformDirsABC.iter_log_paths  s"     &&(Dt* )r   c              #  T   #    U R                  5        H  n[        U5      v   M     g7f)z(:yield: all user and site runtime paths.N)r   r   r+   s     r   iter_runtime_paths"PlatformDirsABC.iter_runtime_paths  s"     **,Dt* -r   )r   r   r   r   r   r   r   r   )NNNFFTFF)r   
str | Noner   zstr | Literal[False] | Noner   r   r   boolr   r   r   r   r   r   r   r   returnNone)r#   strr   r   )r    r   r   r   )r0   r   r   r   )r   r   )r   r   )r   zIterator[str])r   zIterator[Path])D__name__
__module____qualname____firstlineno____doc__r   r%   r"   r1   propertyr   r6   r:   r=   r@   rC   rF   rI   rL   rO   rR   rU   rX   r[   r^   ra   rd   rg   rj   rm   rp   rs   rv   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   __static_attributes__r4   r   r   r   r      s    #15"#"'FF /F 	F
 F F F F  F 
FP: 8  8 7  7 :  : 9  9 9  9 8  8 9  9 8  8 7  7 6  6 =  = =  = <  < :  : 9  9 ;  ; 7  7 6  6 @  @ ?  ? ;  ; :  : ( ( ( ( * * * * ) ) ) ) ) ) ) ) ' ' ' ' - - - - , , * * ) ) + + ' ' ' ' 0 0 0 0 + + + +#
!
"
"
 
$





r   r   )r   
__future__r   r   abcr   r   pathlibr   typingr   collections.abcr   r	   r   r4   r   r   <module>r      s.     " 	 #   ({c {r   