
    h                    p    d Z ddlmZ ddlZddlZddlmZ ddlm	Z	 erddl
mZ  G d d	e	          Zd	gZdS )
zmacOS.    )annotationsN)TYPE_CHECKING   )PlatformDirsABC)Pathc                     e Zd ZdZedd            Zedd            Zedd            Zedd            Zedd	            Z	edd
            Z
edd            Zedd            Zedd            Zedd            Zedd            Zedd            Zedd            Zedd            Zedd            Zedd            Zedd            Zedd            ZdS )MacOSa  
    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>`.

    returnstrc                f    |                      t          j                            d                    S )zb:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``z~/Library/Application Support_append_app_name_and_versionospath
expanduserselfs    P/var/www/html/marketdash/venv/lib/python3.11/site-packages/platformdirs/macos.pyuser_data_dirzMacOS.user_data_dir   s)     001C1CDc1d1deee    c                V   dt           j        v }|r%t           j                            d          d         nd}|r|                     | d          gng }|                    |                     d                     | j        rt          j                            |          S |d         S )aH  
        :return: data directory shared by users, e.g. ``/Library/Application Support/$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/share/$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/share/$appname/$version:/Library/Application Support/$appname/$version``
        /opt/pythonr    z/sharez/Library/Application Support	sysprefixsplitr   append	multipathr   pathsepjoinr   is_homebrewhomebrew_prefix	path_lists       r   site_data_dirzMacOS.site_data_dir    s     $sz1@KS#***=99!<<QSWbjT66/7Q7Q7QRRSShj	::;YZZ[[[> 	.:??9---|r   r   c                6    |                      | j                  S )zh:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``) _first_item_as_path_if_multipathr&   r   s    r   site_data_pathzMacOS.site_data_path2   s     44T5GHHHr   c                    | j         S )zC:return: config directory tied to the user, same as `user_data_dir`r   r   s    r   user_config_dirzMacOS.user_config_dir7        !!r   c                    | j         S )zF:return: config directory shared by the users, same as `site_data_dir`)r&   r   s    r   site_config_dirzMacOS.site_config_dir<   r-   r   c                f    |                      t          j                            d                    S )zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr   r   s    r   user_cache_dirzMacOS.user_cache_dirA   s)     001C1CDV1W1WXXXr   c                V   dt           j        v }|r%t           j                            d          d         nd}|r|                     | d          gng }|                    |                     d                     | j        rt          j                            |          S |d         S )a7  
        :return: 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/Cachesr   r"   s       r   site_cache_dirzMacOS.site_cache_dirF   s     $sz1@KS#***=99!<<QS[fnT66/7U7U7UVVWWln	::;LMMNNN> 	.:??9---|r   c                6    |                      | j                  S )zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r(   r3   r   s    r   site_cache_pathzMacOS.site_cache_pathX   s     44T5HIIIr   c                    | j         S )zB:return: state directory tied to the user, same as `user_data_dir`r+   r   s    r   user_state_dirzMacOS.user_state_dir]   r-   r   c                f    |                      t          j                            d                    S )zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr   r   s    r   user_log_dirzMacOS.user_log_dirb   s)     001C1CDT1U1UVVVr   c                @    t           j                            d          S )zC:return: documents directory tied to the user, e.g. ``~/Documents``z~/Documentsr   r   r   r   s    r   user_documents_dirzMacOS.user_documents_dirg        w!!-000r   c                @    t           j                            d          S )zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z~/Downloadsr;   r   s    r   user_downloads_dirzMacOS.user_downloads_dirl   r=   r   c                @    t           j                            d          S )zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z
~/Picturesr;   r   s    r   user_pictures_dirzMacOS.user_pictures_dirq   s     w!!,///r   c                @    t           j                            d          S )z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr;   r   s    r   user_videos_dirzMacOS.user_videos_dirv   s     w!!*---r   c                @    t           j                            d          S )z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr;   r   s    r   user_music_dirzMacOS.user_music_dir{   s     w!!),,,r   c                @    t           j                            d          S )z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z	~/Desktopr;   r   s    r   user_desktop_dirzMacOS.user_desktop_dir   s     w!!+...r   c                f    |                      t          j                            d                    S )zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsr   r   s    r   user_runtime_dirzMacOS.user_runtime_dir   s)     001C1CDe1f1fgggr   c                    | j         S )zF:return: runtime directory shared by users, same as `user_runtime_dir`)rI   r   s    r   site_runtime_dirzMacOS.site_runtime_dir   s     $$r   N)r
   r   )r
   r   )__name__
__module____qualname____doc__propertyr   r&   r)   r,   r/   r1   r3   r5   r7   r9   r<   r?   rA   rC   rE   rG   rI   rK    r   r   r	   r	      sv       	 	 f f f Xf    X" I I I XI " " " X" " " " X" Y Y Y XY    X" J J J XJ " " " X" W W W XW 1 1 1 X1 1 1 1 X1 0 0 0 X0 . . . X. - - - X- / / / X/ h h h Xh % % % X% % %r   r	   )rO   
__future__r   os.pathr   r   typingr   apir   pathlibr   r	   __all__rQ   r   r   <module>rX      s     " " " " " "  



                         ~% ~% ~% ~% ~%O ~% ~% ~%D r   