PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/platformdirs/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/platformdirs/__pycache__/android.cpython-312.pyc

�

���g5#��0�dZddlmZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZGd�d	e�Z
ed�
�dd��Zed�
�dd��Zed�
�dd
��Zed�
�dd��Zed�
�dd��Zed�
�dd��Zd	gZy)zAndroid.�)�annotationsN)�	lru_cache)�
TYPE_CHECKING�cast�)�PlatformDirsABCc�0�eZdZdZedd��Zedd��Zedd��Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zedd
��Z
edd��Zedd��Zedd
��Zedd��Zedd��Zedd��Zedd��Zy)�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>`.

    c�J�|jtdt��d�S)zd:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``�str�files��_append_app_name_and_versionr�_android_folder��selfs �C/opt/hc_python/lib/python3.12/site-packages/platformdirs/android.py�
user_data_dirzAndroid.user_data_dir�"���0�0��e�_�=N�1O�QX�Y�Y�c��|jS)z@:return: data directory shared by users, same as `user_data_dir`�rrs r�
site_data_dirzAndroid.site_data_dir����!�!�!rc�J�|jtdt��d�S)z�
        :return: config directory tied to the user, e.g.         ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        r�shared_prefsrrs r�user_config_dirzAndroid.user_config_dir!s"���0�0��e�_�=N�1O�Q_�`�`rc��|jS)zH:return: config directory shared by the users, same as `user_config_dir`)rrs r�site_config_dirzAndroid.site_config_dir)s���#�#�#rc�J�|jtdt��d�S)ze:return: cache directory tied to the user, e.g.,``/data/user/<userid>/<packagename>/cache/<AppName>``r�cacherrs r�user_cache_dirzAndroid.user_cache_dir.rrc��|jS)zB:return: cache directory shared by users, same as `user_cache_dir`)r"rs r�site_cache_dirzAndroid.site_cache_dir3s���"�"�"rc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`rrs r�user_state_dirzAndroid.user_state_dir8rrc�v�|j}|jr tjj	|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�rr,s  r�user_log_dirzAndroid.user_log_dir=�/���"�"���<�<��7�7�<�<��e�,�D��rc��t�S)zT:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``)�_android_documents_folderrs r�user_documents_dirzAndroid.user_documents_dirH�
��)�*�*rc��t�S)zT:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``)�_android_downloads_folderrs r�user_downloads_dirzAndroid.user_downloads_dirMr4rc��t�S)zR:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``)�_android_pictures_folderrs r�user_pictures_dirzAndroid.user_pictures_dirRs
��(�)�)rc��t�S)zS:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``)�_android_videos_folderrs r�user_videos_dirzAndroid.user_videos_dirWs
��&�'�'rc��t�S)zL:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``)�_android_music_folderrs r�user_music_dirzAndroid.user_music_dir\s
��%�&�&rc��y)zP:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``z/storage/emulated/0/Desktop�rs r�user_desktop_dirzAndroid.user_desktop_diras��-rc�v�|j}|jr tjj	|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_dirfr0rc��|jS)zF:return: runtime directory shared by users, same as `user_runtime_dir`)rFrs r�site_runtime_dirzAndroid.site_runtime_dirqs���$�$�$rN��returnr)�__name__�
__module__�__qualname__�__doc__�propertyrrrrr"r$r&r/r3r7r:r=r@rCrFrHrBrrr
r
sM����Z��Z��"��"��a��a��$��$��Z��Z��#��#��"��"������+��+��+��+��*��*��(��(��'��'��-��-������%��%rr
)�maxsizec���d}tsM	ddlm}td|j	��}|j�j
�j�}|�;	ddl	m
}|d�}|j�j
�j�}|�Stjd�}tjD])}|j|�s�|j!d�d}nd}|�Ttjd�}tjD]*}|j|�s�|j!d�d}|Sd}|S#t$rd}Y��wxYw#t$rd}Y��wxYw)	zE:return: base folder for the Android OS or None if it cannot be foundNr)�	mActivity�android.content.Context��	autoclassz /data/(data|user/\d+)/(.+)/filesz/filesz7/mnt/expand/[a-fA-F0-9-]{36}/(data|user/\d+)/(.+)/files)r�androidrRr�getApplicationContext�getFilesDir�
getParentFile�getAbsolutePath�	Exception�jniusrU�re�compile�sysr,�match�split)�resultrR�contextrU�patternr,s      rrrws\���F��	�)��4�i�6U�6U�6W�X�G��(�(�*�8�8�:�J�J�L�F��~�	�
(�� 9�:�G��(�(�*�8�8�:�J�J�L�F��~��*�*�@�A���H�H�D��}�}�T�"����H�-�a�0����
�F�
�~��*�*�W�X���H�H�D��}�}�T�"����H�-�a�0����M�
�
�F��M��A�	��F�	���	��F�	�s$�AE�:E�E�
E�E�Ec��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z,:return: documents folder for the Android OSrrTrS�android.os.Environmentz/storage/emulated/0/Documents)r\rU�getExternalFilesDir�DIRECTORY_DOCUMENTSrZr[)rUrc�environment�
documents_dirs    rr2r2��c��8�#��5�6��� 8�9��$�8�8��9X�9X�Y�i�i�k�
�����8�7�
���8���?A�A�Ac��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z,:return: downloads folder for the Android OSrrTrSrfz/storage/emulated/0/Downloads)r\rUrg�DIRECTORY_DOWNLOADSrZr[)rUrcri�
downloads_dirs    rr6r6�rkrlc��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z+:return: pictures folder for the Android OSrrTrSrfz/storage/emulated/0/Pictures)r\rUrg�DIRECTORY_PICTURESrZr[)rUrcri�pictures_dirs    rr9r9�sc��6�#��5�6��� 8�9��#�7�7��8V�8V�W�g�g�i������6�5����6�rlc��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z):return: videos folder for the Android OSrrTrSrfz/storage/emulated/0/DCIM/Camera)r\rUrg�DIRECTORY_DCIMrZr[)rUrcri�
videos_dirs    rr<r<�sc��7�#��5�6��� 8�9��!�5�5�k�6P�6P�Q�a�a�c�
�����7�6�
���7�rlc��	ddlm}|d�}|d�}|j|j�j	�}|S#t
$rd}Y|SwxYw)z(:return: music folder for the Android OSrrTrSrfz/storage/emulated/0/Music)r\rUrg�DIRECTORY_MUSICrZr[)rUrcri�	music_dirs    rr?r?�sc��0�#��5�6��� 8�9�� �4�4�[�5P�5P�Q�a�a�c�	�����0�/�	���0�rl)rJz
str | NonerI)rN�
__future__rr+r]r_�	functoolsr�typingrr�apirr
rr2r6r9r<r?�__all__rBrr�<module>r~s����"�	�	�
��&� �f%�o�f%�R�1��,��,�^�1������1������1������1������1����� ��r

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic