a
     ñ»j²  ã                   @  sb   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rHddl
mZ G dd	„ d	e	ƒZd	gZdS )
zmacOS.é    )ÚannotationsN)ÚTYPE_CHECKINGé   )ÚPlatformDirsABC)ÚPathc                   @  sT  e Zd ZdZeddœdd„ƒZeddœdd„ƒZeddœd	d
„ƒZeddœdd„ƒZeddœdd„ƒZ	eddœdd„ƒZ
eddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd „ƒZeddœd!d"„ƒZeddœd#d$„ƒZeddœd%d&„ƒZed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>`.

    Ústr)Úreturnc                 C  s   |   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   ú8E:\soccer\ml_env\Lib\site-packages\platformdirs/macos.pyÚuser_data_dir   s    zMacOS.user_data_dirc                 C  sf   dt jv }|rt j d¡d nd}|r8|  |› 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   Zis_homebrewZhomebrew_prefixÚ	path_listr   r   r   Úsite_data_dir    s    

zMacOS.site_data_dirr   c                 C  s   |   | 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   r   r   r   Úsite_data_path2   s    zMacOS.site_data_pathc                 C  s   | j S )zC:return: config directory tied to the user, same as `user_data_dir`©r   r   r   r   r   Úuser_config_dir7   s    zMacOS.user_config_dirc                 C  s   | j S )zF:return: config directory shared by the users, same as `site_data_dir`)r    r   r   r   r   Úsite_config_dir<   s    zMacOS.site_config_dirc                 C  s   |   tj d¡¡S )zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr
   r   r   r   r   Úuser_cache_dirA   s    zMacOS.user_cache_dirc                 C  sf   dt jv }|rt j d¡d nd}|r8|  |› 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   r   r   r   Úsite_cache_dirF   s    

zMacOS.site_cache_dirc                 C  s   |   | j¡S )zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r!   r'   r   r   r   r   Úsite_cache_pathX   s    zMacOS.site_cache_pathc                 C  s   | j S )zB:return: state directory tied to the user, same as `user_data_dir`r#   r   r   r   r   Úuser_state_dir]   s    zMacOS.user_state_dirc                 C  s   |   tj d¡¡S )zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr
   r   r   r   r   Úuser_log_dirb   s    zMacOS.user_log_dirc                 C  s   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_dirg   s    zMacOS.user_documents_dirc                 C  s   t j d¡S )zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z~/Downloadsr+   r   r   r   r   Úuser_downloads_dirl   s    zMacOS.user_downloads_dirc                 C  s   t j d¡S )zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z
~/Picturesr+   r   r   r   r   Úuser_pictures_dirq   s    zMacOS.user_pictures_dirc                 C  s   t j d¡S )z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr+   r   r   r   r   Úuser_videos_dirv   s    zMacOS.user_videos_dirc                 C  s   t j d¡S )z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr+   r   r   r   r   Úuser_music_dir{   s    zMacOS.user_music_dirc                 C  s   t j d¡S )z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z	~/Desktopr+   r   r   r   r   Úuser_desktop_dir€   s    zMacOS.user_desktop_dirc                 C  s   |   tj d¡¡S )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_dir…   s    zMacOS.user_runtime_dirc                 C  s   | j S )zF:return: runtime directory shared by users, same as `user_runtime_dir`)r2   r   r   r   r   Úsite_runtime_dirŠ   s    zMacOS.site_runtime_dirN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r    r"   r$   r%   r&   r'   r(   r)   r*   r,   r-   r.   r/   r0   r1   r2   r3   r   r   r   r   r      sJ   r   )r7   Ú
__future__r   Úos.pathr   r   Útypingr   Úapir   Úpathlibr   r   Ú__all__r   r   r   r   Ú<module>   s    ÿ