File: //usr/local/lib/python3.10/dist-packages/platformdirs/__pycache__/macos.cpython-310.pyc
o
j�h� � @ sb d Z ddlmZ ddlZddlZddlmZ ddlm Z er$ddl
mZ G dd � d e �Zd gZ
dS )
zmacOS.� )�annotationsN)�
TYPE_CHECKING� )�PlatformDirsABC)�Pathc @ s e Zd ZdZed*dd��Zed*dd��Zed+d d
��Zed*dd��Zed*d
d��Z ed*dd��Z
ed*dd��Zed+dd��Zed*dd��Z
ed*dd��Zed*dd��Zed*dd��Zed*dd��Zed*dd ��Zed*d!d"��Zed*d#d$��Zed*d%d&��Zed*d'd(��Zd)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 � | � tj�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 �=/usr/local/lib/python3.10/dist-packages/platformdirs/macos.py�
user_data_dir � zMacOS.user_data_dirc C �f dt jv }|rt j�d�d nd}|r| �|� d��gng }|�| �d�� | jr/tj�|�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_listr r r �
site_data_dir �
zMacOS.site_data_dirr c C � | � | 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 � zMacOS.site_data_pathc C � | j S )zC:return: config directory tied to the user, same as `user_data_dir`�r r r r r �user_config_dir7 � zMacOS.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_dir<