관리-도구
편집 파일: android.cpython-38.pyc
U &?�f8# � @ s� d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z m Z ddlmZ G dd � d e�Z edd �dd�d d��Zedd �dd�dd��Zedd �dd�dd��Zedd �dd�dd��Zedd �dd�dd��Zedd �dd�dd��Zd gZdS )zAndroid.� )�annotationsN)� lru_cache)� TYPE_CHECKING�cast� )�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 )%�Androida" Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. 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 | � ttt� �d�S )zd:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``�files��_append_app_name_and_versionr r �_android_folder��self� r �N/opt/hc_python/lib/python3.8/site-packages/pip/_vendor/platformdirs/android.py� user_data_dir s zAndroid.user_data_dirc C s | j S )z@:return: data directory shared by users, same as `user_data_dir`�r r r r r � site_data_dir s zAndroid.site_data_dirc C s | � ttt� �d�S )z� :return: config directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>`` Zshared_prefsr r r r r �user_config_dir! s zAndroid.user_config_dirc C s | j S )zH:return: config directory shared by the users, same as `user_config_dir`)r r r r r �site_config_dir) s zAndroid.site_config_dirc C s | � ttt� �d�S )ze:return: cache directory tied to the user, e.g.,``/data/user/<userid>/<packagename>/cache/<AppName>``�cacher r r r r �user_cache_dir. s zAndroid.user_cache_dirc C s | j S )zB:return: cache directory shared by users, same as `user_cache_dir`)r r r r r �site_cache_dir3 s zAndroid.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_dir8 s zAndroid.user_state_dirc C s | j }| jrtj�|d�}|S )z� :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it, e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log`` �log�r �opinion�os�path�join�r r! r r r �user_log_dir= s zAndroid.user_log_dirc C s t � S )zT:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``)�_android_documents_folderr r r r �user_documents_dirH s zAndroid.user_documents_dirc C s t � S )zT:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``)�_android_downloads_folderr r r r �user_downloads_dirM s zAndroid.user_downloads_dirc C s t � S )zR:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``)�_android_pictures_folderr r r r �user_pictures_dirR s zAndroid.user_pictures_dirc C s t � S )zS:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``)�_android_videos_folderr r r r �user_videos_dirW s zAndroid.user_videos_dirc C s t � S )zL:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``)�_android_music_folderr r r r �user_music_dir\ s zAndroid.user_music_dirc C s dS )zP:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``z/storage/emulated/0/Desktopr r r r r �user_desktop_dira s zAndroid.user_desktop_dirc C s | j }| jrtj�|d�}|S )z� :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it, e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp`` �tmpr r# r r r �user_runtime_dirf s zAndroid.user_runtime_dirc C s | j S )zF:return: runtime directory shared by users, same as `user_runtime_dir`)r1 r r r r �site_runtime_dirq s zAndroid.site_runtime_dirN)�__name__� __module__�__qualname__�__doc__�propertyr r r r r r r r$ r&