Sindbad~EG File Manager
�
4Μg� � �L � d Z ddlmZ ddlZddlZddlmZ G d� de� ZdgZ y)zmacOS.� )�annotationsN� )�PlatformDirsABCc �0 � e Zd ZdZedd�� Zedd�� Zedd�� Zedd�� Zedd�� Z edd�� Z
edd�� Zedd �� Zedd
�� Z
edd�� Zedd�� Zedd
�� Zedd�� Zedd�� Zedd�� Zedd�� Zy)�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>`.
c �^ � | j t j 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 �I/usr/local/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py�
user_data_dirzMacOS.user_data_dir s% � � �0�0����1C�1C�Dc�1d�e�e� c � � t j j d� }|r| j d� gng }|j | j d� � | j
rt j 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_lists r �
site_data_dirzMacOS.site_data_dir so � � �j�j�+�+�O�<��R]�T�6�6�7L�M�N�ce� �����:�:�;Y�Z�[��>�>��:�:�?�?�9�-�-���|�r c � � | j S )zC:return: config directory tied to the user, same as `user_data_dir`�r r s r �user_config_dirzMacOS.user_config_dir- � � � �!�!�!r c � � | j S )zF:return: config directory shared by the users, same as `site_data_dir`)r r s r �site_config_dirzMacOS.site_config_dir2 r$ r c �^ � | j t j 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_dirzMacOS.user_cache_dir7 s% � � �0�0����1C�1C�DV�1W�X�Xr c � � t j j d� }|r| j d� gng }|j | j d� � | j
rt j j |� S |d S )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 s r �site_cache_dirzMacOS.site_cache_dir<