Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/platformdirs/__pycache__/macos.cpython-39.pyc
Ðазад
a e�h � @ sb d Z ddlmZ ddlZddlZddlmZ ddlm Z erHddl mZ G dd � d e �Zd gZ dS ) zmacOS.� )�annotationsN)� TYPE_CHECKING� )�PlatformDirsABC)�Pathc @ sT e Zd ZdZedd�dd��Zedd�dd��Zedd�d d ��Zedd�dd��Zedd�d d��Z edd�dd��Z edd�dd��Zedd�dd��Zedd�dd��Z edd�dd��Zedd�dd��Zedd�dd��Zedd�dd��Zedd�dd ��Zedd�d!d"��Zedd�d#d$��Zedd�d%d&��Zedd�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>`. �str)�returnc C s | � 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 ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/platformdirs/macos.py� user_data_dir s zMacOS.user_data_dirc C sJ t j�d�}|r| �d�gng }|�| �d�� | jrBtj�|�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 Zis_homebrew� path_listr r r � site_data_dir s zMacOS.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_path1 s zMacOS.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_dir6 s zMacOS.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 zMacOS.site_config_dirc C s | � tj�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_dir@ s zMacOS.user_cache_dirc C sJ t j�d�}|r| �d�gng }|�| �d�� | jrBtj�|�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 r r r �site_cache_dirE s zMacOS.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&