관리-도구
편집 파일: macos.cpython-38.pyc
U )�e� � @ sF d Z ddlmZ ddlZddlZddlmZ G dd� de�ZdgZ dS )zmacOS.� )�annotationsN� )�PlatformDirsABCc @ s0 e Zd ZdZedd�dd��Zedd�dd��Zedd�dd ��Zedd�d d��Zedd�dd ��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#��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 �@/opt/hc_python/lib/python3.8/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 )aA :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_dirc C s | j S )zC:return: config directory tied to the user, same as `user_data_dir`�r r r r r �user_config_dir* 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_dir4 s zMacOS.user_cache_dirc C sJ t j�d�}|r| �d�gng }|�| �d�� | jrBtj�|�S |d S )a0 :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_dir9 s zMacOS.site_cache_dirc C s | j S )zB:return: state directory tied to the user, same as `user_data_dir`r r r r r �user_state_dirJ s zMacOS.user_state_dirc C s | � tj�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_dirO s zMacOS.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_dirT s zMacOS.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_dirY s zMacOS.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_dir^ s zMacOS.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_dirc s zMacOS.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_dirh s zMacOS.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_dirm s zMacOS.user_desktop_dirc C s | � tj�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_dirr s zMacOS.user_runtime_dirc C s | j S )zF:return: runtime directory shared by users, same as `user_runtime_dir`)r, r r r r �site_runtime_dirw s zMacOS.site_runtime_dirN)�__name__� __module__�__qualname__�__doc__�propertyr r r r r! r"