HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/platformdirs/__pycache__/macos.cpython-310.pyc
o

j�h��@sbdZddlmZddlZddlZddlmZddlm	Z	er$ddl
mZGdd	�d	e	�Zd	gZ
dS)
zmacOS.�)�annotationsN)�
TYPE_CHECKING�)�PlatformDirsABC)�Pathc@seZdZdZed*dd��Zed*dd��Zed+d	d
��Zed*dd��Zed*d
d��Z	ed*dd��Z
ed*dd��Zed+dd��Zed*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�strcC�|�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_dircC�fdtjv}|rtj�d�dnd}|r|�|�d��gng}|�|�d��|jr/tj�|�S|dS)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_listrrr�
site_data_dir �

zMacOS.site_data_dirrcC�|�|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%rrrr�site_data_path2�zMacOS.site_data_pathcC�|jS)zC:return: config directory tied to the user, same as `user_data_dir`�rrrrr�user_config_dir7�zMacOS.user_config_dircCr+)zF:return: config directory shared by the users, same as `site_data_dir`)r%rrrr�site_config_dir<r.zMacOS.site_config_dircCr
)zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesrrrrr�user_cache_dirArzMacOS.user_cache_dircCr)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``
        rrrz
/var/cachez/Library/Cachesrr!rrr�site_cache_dirFr&zMacOS.site_cache_dircCr')zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r(r1rrrr�site_cache_pathXr*zMacOS.site_cache_pathcCr+)zB:return: state directory tied to the user, same as `user_data_dir`r,rrrr�user_state_dir]r.zMacOS.user_state_dircCr
)zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsrrrrr�user_log_dirbrzMacOS.user_log_dircC�tj�d�S)zC:return: documents directory tied to the user, e.g. ``~/Documents``z~/Documents�r
rrrrrr�user_documents_dirgr*zMacOS.user_documents_dircCr5)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z~/Downloadsr6rrrr�user_downloads_dirlr*zMacOS.user_downloads_dircCr5)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z
~/Picturesr6rrrr�user_pictures_dirqr*zMacOS.user_pictures_dircCr5)z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr6rrrr�user_videos_dirvr*zMacOS.user_videos_dircCr5)z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr6rrrr�user_music_dir{r*zMacOS.user_music_dircCr5)z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z	~/Desktopr6rrrr�user_desktop_dir�r*zMacOS.user_desktop_dircCr
)zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsrrrrr�user_runtime_dir�rzMacOS.user_runtime_dircCr+)zF:return: runtime directory shared by users, same as `user_runtime_dir`)r=rrrr�site_runtime_dir�r.zMacOS.site_runtime_dirN)rr	)rr)�__name__�
__module__�__qualname__�__doc__�propertyrr%r)r-r/r0r1r2r3r4r7r8r9r:r;r<r=r>rrrrrsLr)rB�
__future__r�os.pathr
r�typingr�apir�pathlibrr�__all__rrrr�<module>s�