Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/platformdirs/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/platformdirs/__pycache__/android.cpython-311.pyc

�

�܋f���|�dZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZGd�d	e��Zed�
��dd
���Z
ed�
��dd���Zed�
��dd���Zed�
��dd���Zed�
��dd���Zed�
��dd���Zd	gZdS)zAndroid.�)�annotationsN)�	lru_cache)�cast�)�PlatformDirsABCc��eZdZdZedd���Zedd���Zedd���Zedd���Zedd���Z	edd	���Z
edd
���Zedd���Zedd���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�|�ttt����d��S)zd:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``�files��_append_app_name_and_versionrr�_android_folder��selfs �e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/platformdirs/android.py�
user_data_dirzAndroid.user_data_dir�*���0�0��c�?�;L�;L�1M�1M�w�W�W�W�c��|jS)z@:return: data directory shared by users, same as `user_data_dir`�rrs r�
site_data_dirzAndroid.site_data_dir�
���!�!rc�l�|�ttt����d��S)z�
        :return: config directory tied to the user, e.g.         ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        �shared_prefsrrs r�user_config_dirzAndroid.user_config_dirs*���0�0��c�?�;L�;L�1M�1M�~�^�^�^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�l�|�ttt����d��S)zj:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``�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_dir1s
���"�"rc��|jS)zB:return: state directory tied to the user, same as `user_data_dir`rrs r�user_state_dirzAndroid.user_state_dir6rrc�b�|j}|jr tj�|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;�0���"���<�	-��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_dirF���)�*�*�*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_dirKr4rc��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_dirPs��(�)�)�)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_dirUs��&�'�'�'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_dirZs��%�&�&�&rc��dS)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_dir_s
��-�,rc�b�|j}|jr tj�|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_dirdr0rc��|jS)zF:return: runtime directory shared by users, same as `user_runtime_dir`)rFrs r�site_runtime_dirzAndroid.site_runtime_diros
���$�$rN�r
r)�__name__�
__module__�__qualname__�__doc__�propertyrrrrr"r$r&r/r3r7r:r=r@rCrFrHrBrrr	r	
s*���������X�X�X��X�X��"�"�"��X�"��_�_�_��X�_��$�$�$��X�$��X�X�X��X�X��#�#�#��X�#��"�"�"��X�"������X���+�+�+��X�+��+�+�+��X�+��*�*�*��X�*��(�(�(��X�(��'�'�'��X�'��-�-�-��X�-������X���%�%�%��X�%�%�%rr	)�maxsizer
�
str | Nonec�j�	ddlm}|d��}|���������}ng#t
$rZt
jd��}tj	D]4}|�
|��r|�d��d}n�5d}YnwxYw|S)zE:return: base folder for the Android OS or None if it cannot be foundr��	autoclass�android.content.Contextz /data/(data|user/\d+)/(.+)/filesz/filesN)�jniusrS�getFilesDir�
getParentFile�getAbsolutePath�	Exception�re�compile�sysr,�match�split)rS�context�result�patternr,s     rrrus����#�#�#�#�#�#��)�5�6�6��$�0�0�2�2�@�@�B�B�R�R�T�T���������*�@�A�A���H�	�	�D��}�}�T�"�"�
����H�-�-�a�0����
��F��������Ms�A	A�A!B0�/B0rc��	ddlm}|d��}|d��}|�|j�����}n#t
$rd}YnwxYw|S)z,:return: documents folder for the Android OSrrRrT�android.os.Environmentz/storage/emulated/0/Documents)rUrS�getExternalFilesDir�DIRECTORY_DOCUMENTSrXrY)rSr_�environment�
documents_dirs    rr2r2����8�#�#�#�#�#�#��)�5�6�6���i� 8�9�9��$�8�8��9X�Y�Y�i�i�k�k�
�
���8�8�8�7�
�
�
�8�������AA�A�Ac��	ddlm}|d��}|d��}|�|j�����}n#t
$rd}YnwxYw|S)z,:return: downloads folder for the Android OSrrRrTrcz/storage/emulated/0/Downloads)rUrSrd�DIRECTORY_DOWNLOADSrXrY)rSr_rf�
downloads_dirs    rr6r6�rhric��	ddlm}|d��}|d��}|�|j�����}n#t
$rd}YnwxYw|S)z+:return: pictures folder for the Android OSrrRrTrcz/storage/emulated/0/Pictures)rUrSrd�DIRECTORY_PICTURESrXrY)rSr_rf�pictures_dirs    rr9r9�s���6�#�#�#�#�#�#��)�5�6�6���i� 8�9�9��#�7�7��8V�W�W�g�g�i�i�����6�6�6�5����6�����ric��	ddlm}|d��}|d��}|�|j�����}n#t
$rd}YnwxYw|S)z):return: videos folder for the Android OSrrRrTrcz/storage/emulated/0/DCIM/Camera)rUrSrd�DIRECTORY_DCIMrXrY)rSr_rf�
videos_dirs    rr<r<�s���7�#�#�#�#�#�#��)�5�6�6���i� 8�9�9��!�5�5�k�6P�Q�Q�a�a�c�c�
�
���7�7�7�6�
�
�
�7�����ric��	ddlm}|d��}|d��}|�|j�����}n#t
$rd}YnwxYw|S)z(:return: music folder for the Android OSrrRrTrcz/storage/emulated/0/Music)rUrSrd�DIRECTORY_MUSICrXrY)rSr_rf�	music_dirs    rr?r?�s���0�#�#�#�#�#�#��)�5�6�6���i� 8�9�9�� �4�4�[�5P�Q�Q�a�a�c�c�	�	���0�0�0�/�	�	�	�0�����ri)r
rPrI)rM�
__future__rr+rZr\�	functoolsr�typingr�apirr	rr2r6r9r<r?�__all__rBrr�<module>r{s�����"�"�"�"�"�"�	�	�	�	�	�	�	�	�
�
�
�
������������� � � � � � �e%�e%�e%�e%�e%�o�e%�e%�e%�P��1����������(��1������������1������������1������������1������������1���������� ����r

Hacked By AnonymousFox1.0, Coded By AnonymousFox