
    2 j                        S r SSKJr  SSKrSSKrSSKJr  \(       a  SSKJ	r	  SSK
Jr  SSKJr  \(       a  SS	KJr   " S
 S\5      r " S S\\5      rS/rg)zmacOS.    )annotationsN)TYPE_CHECKING)Iterator   )XDGMixin)PlatformDirsABC)Pathc                  4   \ rS rSrSrS"S jrS#S jr\S"S j5       r\S#S j5       r	\S$S j5       r
\S"S j5       r\S#S	 j5       r\S"S
 j5       r\S"S j5       r\S$S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S"S j5       r\S#S j5       r\S"S j5       r\S"S j5       r\S"S j5       r S%S jr!S%S jr"S r#g!)&_MacOSDefaults   ax  Default platform directories for macOS without XDG environment variable overrides.

Follows the guidance from `Apple's File System Programming Guide
<https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`.

c                ^    U R                  [        R                  R                  S5      5      $ )Nz~/Library/Application Support_append_app_name_and_versionospath
expanduserselfs    c/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/platformdirs/macos.py_base_user_app_support_dir)_MacOSDefaults._base_user_app_support_dir   s#    001C1CDc1dee    c                    S[         R                  ;   nU(       a"  [         R                  R                  S5      S   OSnU(       a  U R                  U S35      /O/ nUR	                  U R                  S5      5        U$ )N/opt/pythonr    z/sharez/Library/Application Support)sysprefixsplitr   appendr   is_homebrewhomebrew_prefix	path_lists       r   _base_site_dirs_MacOSDefaults._base_site_dirs   sn    #szz1@K#****=9!<QSWbT66/9J&7QRShj	::;YZ[r   c                "    U R                  5       $ )zc:returns: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``r   r   s    r   user_data_dir_MacOSDefaults.user_data_dir&        ..00r   c                "    U R                  5       $ Nr$   r   s    r   _site_data_dirs_MacOSDefaults._site_data_dirs+       ##%%r   c                8    U R                  U R                  5      $ )zi:returns: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``) _first_item_as_path_if_multipathsite_data_dirr   s    r   site_data_path_MacOSDefaults.site_data_path/   s     44T5G5GHHr   c                "    U R                  5       $ )zD:returns: config directory tied to the user, same as `user_data_dir`r'   r   s    r   user_config_dir_MacOSDefaults.user_config_dir4   r*   r   c                "    U R                  5       $ r,   r-   r   s    r   _site_config_dirs _MacOSDefaults._site_config_dirs9   r0   r   c                ^    U R                  [        R                  R                  S5      5      $ )zW:returns: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr   r   s    r   user_cache_dir_MacOSDefaults.user_cache_dir=   s%     001C1CDV1WXXr   c                d   S[         R                  ;   nU(       a"  [         R                  R                  S5      S   OSnU(       a  U R                  U S35      /O/ nUR	                  U R                  S5      5        U R
                  (       a  [        R                  R                  U5      $ US   $ )a  :returns: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. If `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``r   r   r   z
/var/cachez/Library/Caches)	r   r   r   r   r   	multipathr   pathsepjoinr    s       r   site_cache_dir_MacOSDefaults.site_cache_dirB   s     $szz1@K#****=9!<QS[fT66/9J*7UVWln	::;LMN>>::??9--|r   c                8    U R                  U R                  5      $ )zj:returns: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r2   rC   r   s    r   site_cache_path_MacOSDefaults.site_cache_pathM   s     44T5H5HIIr   c                "    U R                  5       $ )zC:returns: state directory tied to the user, same as `user_data_dir`r'   r   s    r   user_state_dir_MacOSDefaults.user_state_dirR   r*   r   c                (    U R                  5       S   $ )zB:returns: state directory shared by users, same as `site_data_dir`r   r-   r   s    r   site_state_dir_MacOSDefaults.site_state_dirW   s     ##%a((r   c                ^    U R                  [        R                  R                  S5      5      $ )zS:returns: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr   r   s    r   user_log_dir_MacOSDefaults.user_log_dir\   s%     001C1CDT1UVVr   c                $    U R                  S5      $ )zQ:returns: log directory shared by users, e.g. ``/Library/Logs/$appname/$version``z/Library/Logs)r   r   s    r   site_log_dir_MacOSDefaults.site_log_dira   s     00AAr   c                @    [         R                  R                  S5      $ )zD:returns: documents directory tied to the user, e.g. ``~/Documents``z~/Documentsr   r   r   r   s    r   user_documents_dir!_MacOSDefaults.user_documents_dirf        ww!!-00r   c                @    [         R                  R                  S5      $ )zD:returns: downloads directory tied to the user, e.g. ``~/Downloads``z~/DownloadsrU   r   s    r   user_downloads_dir!_MacOSDefaults.user_downloads_dirk   rX   r   c                @    [         R                  R                  S5      $ )zB:returns: pictures directory tied to the user, e.g. ``~/Pictures``z
~/PicturesrU   r   s    r   user_pictures_dir _MacOSDefaults.user_pictures_dirp   s     ww!!,//r   c                @    [         R                  R                  S5      $ )z>:returns: videos directory tied to the user, e.g. ``~/Movies``z~/MoviesrU   r   s    r   user_videos_dir_MacOSDefaults.user_videos_diru   s     ww!!*--r   c                @    [         R                  R                  S5      $ )z<:returns: music directory tied to the user, e.g. ``~/Music``z~/MusicrU   r   s    r   user_music_dir_MacOSDefaults.user_music_dirz   s     ww!!),,r   c                @    [         R                  R                  S5      $ )z@:returns: desktop directory tied to the user, e.g. ``~/Desktop``z	~/DesktoprU   r   s    r   user_desktop_dir_MacOSDefaults.user_desktop_dir   s     ww!!+..r   c                @    [         R                  R                  S5      $ )z?:returns: bin directory tied to the user, e.g. ``~/.local/bin``z~/.local/binrU   r   s    r   user_bin_dir_MacOSDefaults.user_bin_dir   s     ww!!.11r   c                    g)z@:returns: bin directory shared by users, e.g. ``/usr/local/bin``z/usr/local/bin r   s    r   site_bin_dir_MacOSDefaults.site_bin_dir   s      r   c                @    [         R                  R                  S5      $ )zJ:returns: applications directory tied to the user, e.g. ``~/Applications``z~/ApplicationsrU   r   s    r   user_applications_dir$_MacOSDefaults.user_applications_dir   s     ww!!"233r   c                    S/$ )Nz/Applicationsrl   r   s    r   _site_applications_dirs&_MacOSDefaults._site_applications_dirs   s      r   c                    U R                   nU R                  (       a  [        R                  R	                  U5      $ US   $ )zH:returns: applications directory shared by users, e.g. ``/Applications``r   )rs   r@   r   rA   rB   )r   dirss     r   site_applications_dir$_MacOSDefaults.site_applications_dir   s1     ++(,rzzt$CDGCr   c                ^    U R                  [        R                  R                  S5      5      $ )zh:returns: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsr   r   s    r   user_runtime_dir_MacOSDefaults.user_runtime_dir   s%     001C1CDe1fggr   c                    U R                   $ )zG:returns: runtime directory shared by users, same as `user_runtime_dir`)rz   r   s    r   site_runtime_dir_MacOSDefaults.site_runtime_dir   s     $$$r   c              #  T   #    U R                   v   U R                   Sh  vN   g N7f)z4:yield: all user and site configuration directories.N)r7   r:   r   s    r   iter_config_dirs_MacOSDefaults.iter_config_dirs   s      """))))   (&(c              #  T   #    U R                   v   U R                   Sh  vN   g N7f)z+:yield: all user and site data directories.N)r(   r.   r   s    r   iter_data_dirs_MacOSDefaults.iter_data_dirs   s         ''''r   rl   N)returnstr)r   z	list[str])r   r	   )r   zIterator[str])$__name__
__module____qualname____firstlineno____doc__r   r$   propertyr(   r.   r4   r7   r:   r=   rC   rF   rI   rL   rO   rR   rV   rZ   r]   r`   rc   rf   ri   rm   rp   rs   rw   rz   r}   r   r   __static_attributes__rl   r   r   r   r      s   f 1 1 & & I I 1 1 & & Y Y   J J 1 1 ) ) W W B B 1 1 1 1 0 0 . . - - / / 2 2     4 4 ! ! D D
 h h % %*
(r   r   c                      \ rS rSrSrSrg)MacOS   a.  Platform directories for the macOS operating system.

Follows the guidance from `Apple documentation
<https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `version
<platformdirs.api.PlatformDirsABC.version>`, `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.

XDG environment variables (e.g. ``$XDG_DATA_HOME``) are supported and take precedence over macOS defaults.

rl   N)r   r   r   r   r   r   rl   r   r   r   r      s    	r   r   )r   
__future__r   os.pathr   r   typingr   collections.abcr   _xdgr   apir   pathlibr	   r   r   __all__rl   r   r   <module>r      sO     "  
  (   \(_ \(~
Hn 
 r   