관리-도구
편집 파일: android.cpython-311.pyc
� �Dg8# � � � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z m Z ddlmZ G d� d e� � Z ed� � � dd �� � Z ed� � � dd�� � Z ed� � � dd�� � Z ed� � � dd�� � Z ed� � � dd�� � Z ed� � � dd�� � Zd gZdS )zAndroid.� )�annotationsN)� lru_cache)� TYPE_CHECKING�cast� )�PlatformDirsABCc � � e Zd ZdZedd�� � Zedd�� � Zedd�� � Zedd�� � Zedd�� � Z edd �� � Z edd �� � Zedd�� � Zedd�� � Z edd �� � Zedd�� � Zedd�� � Zedd�� � Zedd�� � Zedd�� � Zedd�� � ZdS )�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>`. �return�strc �l � | � t t t � � � � 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��selfs ��/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/platformdirs/android.py� user_data_dirzAndroid.user_data_dir �* � � �0�0��c�?�;L�;L�1M�1M�w�W�W�W� c � � | j S )z@:return: data directory shared by users, same as `user_data_dir`�r r s r � site_data_dirzAndroid.site_data_dir � � � �!�!r c �l � | � t t t � � � � d� � S )z� :return: config directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>`` �shared_prefsr r s r �user_config_dirzAndroid.user_config_dir! s* � � �0�0��c�?�;L�;L�1M�1M�~�^�^�^r c � � | j S )zH:return: config directory shared by the users, same as `user_config_dir`)r r s r �site_config_dirzAndroid.site_config_dir) s � � �#�#r c �l � | � t t t � � � � d� � S )ze:return: cache directory tied to the user, e.g.,``/data/user/<userid>/<packagename>/cache/<AppName>``�cacher r s r �user_cache_dirzAndroid.user_cache_dir. r r c � � | j S )zB:return: cache directory shared by users, same as `user_cache_dir`)r# r s r �site_cache_dirzAndroid.site_cache_dir3 s � � �"�"r c � � | j S )zB:return: state directory tied to the user, same as `user_data_dir`r r s r �user_state_dirzAndroid.user_state_dir8 r r c �b � | j }| j r t j � |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- s r �user_log_dirzAndroid.user_log_dir= �0 � � �"���<� -��7�<�<��e�,�,�D��r c � � t � � S )zT:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``)�_android_documents_folderr s r �user_documents_dirzAndroid.user_documents_dirH � � � )�*�*�*r c � � t � � S )zT:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``)�_android_downloads_folderr s r �user_downloads_dirzAndroid.user_downloads_dirM r5 r c � � t � � S )zR:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``)�_android_pictures_folderr s r �user_pictures_dirzAndroid.user_pictures_dirR s � � (�)�)�)r c � � t � � S )zS:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``)�_android_videos_folderr s r �user_videos_dirzAndroid.user_videos_dirW s � � &�'�'�'r c � � t � � S )zL:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``)�_android_music_folderr s r �user_music_dirzAndroid.user_music_dir\ s � � %�&�&�&r c � � dS )zP:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``z/storage/emulated/0/Desktop� r s r �user_desktop_dirzAndroid.user_desktop_dira s � � -�,r c �b � | j }| j r t j � |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/ s r �user_runtime_dirzAndroid.user_runtime_dirf r1 r c � � | j S )zF:return: runtime directory shared by users, same as `user_runtime_dir`)rG r s r �site_runtime_dirzAndroid.site_runtime_dirq s � � �$�$r N�r r )�__name__� __module__�__qualname__�__doc__�propertyr r r r r# r% r'