o
    LK&hÌ  ã                   @  sF   d Z ddlmZ ddlZddlZddlmZ G dd„ deƒZdgZ	dS )zmacOS.é    )ÚannotationsNé   )ÚPlatformDirsABCc                   @  sð   e Zd ZdZed%dd„ƒZed%dd„ƒZed%dd	„ƒZed%d
d„ƒZed%dd„ƒZ	ed%dd„ƒZ
ed%dd„ƒZed%dd„ƒZed%dd„ƒZed%dd„ƒZed%dd„ƒZed%dd„ƒZed%dd„ƒZed%dd„ƒZed%d d!„ƒZed%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                 C  ó   |   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©Úself© r   úX/var/www/html/venv/lib/python3.10/site-packages/setuptools/_vendor/platformdirs/macos.pyÚuser_data_dir   ó   zMacOS.user_data_dirc                 C  óJ   t j d¡}|r|  d¡gng }| |  d¡¡ | jr!tj |¡S |d S )aB  
        :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. ``/opt/homebrew/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.
          ``/opt/homebrew/share/$appname/$version:/Library/Application Support/$appname/$version``
        ú/opt/homebrewz/opt/homebrew/sharez/Library/Application Supportr   ©	ÚsysÚprefixÚ
startswithr
   ÚappendÚ	multipathr   ÚpathsepÚjoin©r   Úis_homebrewÚ	path_listr   r   r   Úsite_data_dir   ó   
zMacOS.site_data_dirc                 C  ó   | j S )zC:return: config directory tied to the user, same as `user_data_dir`©r   r   r   r   r   Úuser_config_dir-   ó   zMacOS.user_config_dirc                 C  r#   )zF:return: config directory shared by the users, same as `site_data_dir`)r!   r   r   r   r   Úsite_config_dir2   r&   zMacOS.site_config_dirc                 C  r   )zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr	   r   r   r   r   Úuser_cache_dir7   r   zMacOS.user_cache_dirc                 C  r   )a1  
        :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. ``/opt/homebrew/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.
          ``/opt/homebrew/var/cache/$appname/$version:/Library/Caches/$appname/$version``
        r   z/opt/homebrew/var/cachez/Library/Cachesr   r   r   r   r   r   Úsite_cache_dir<   r"   zMacOS.site_cache_dirc                 C  r#   )zB:return: state directory tied to the user, same as `user_data_dir`r$   r   r   r   r   Úuser_state_dirM   r&   zMacOS.user_state_dirc                 C  r   )zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr	   r   r   r   r   Úuser_log_dirR   r   zMacOS.user_log_dirc                 C  ó   t j d¡S )zC:return: documents directory tied to the user, e.g. ``~/Documents``z~/Documents©r   r   r   r   r   r   r   Úuser_documents_dirW   ó   zMacOS.user_documents_dirc                 C  r,   )zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z~/Downloadsr-   r   r   r   r   Úuser_downloads_dir\   r/   zMacOS.user_downloads_dirc                 C  r,   )zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z
~/Picturesr-   r   r   r   r   Úuser_pictures_dira   r/   zMacOS.user_pictures_dirc                 C  r,   )z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr-   r   r   r   r   Úuser_videos_dirf   r/   zMacOS.user_videos_dirc                 C  r,   )z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr-   r   r   r   r   Úuser_music_dirk   r/   zMacOS.user_music_dirc                 C  r,   )z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z	~/Desktopr-   r   r   r   r   Úuser_desktop_dirp   r/   zMacOS.user_desktop_dirc                 C  r   )zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsr	   r   r   r   r   Úuser_runtime_diru   r   zMacOS.user_runtime_dirc                 C  r#   )zF:return: runtime directory shared by users, same as `user_runtime_dir`)r5   r   r   r   r   Úsite_runtime_dirz   r&   zMacOS.site_runtime_dirN)r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r!   r%   r'   r(   r)   r*   r+   r.   r0   r1   r2   r3   r4   r5   r6   r   r   r   r   r      sD    r   )
r:   Ú
__future__r   Úos.pathr   r   Úapir   r   Ú__all__r   r   r   r   Ú<module>   s    vÿ