HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-310.pyc
o

@%Ne��@s~ddlmZddlZddlZddlZddlmZddlmZGdd�de�Z	edd�ddd��Z
edd�dd
d��ZdgZdS)�)�annotationsN)�	lru_cache�)�PlatformDirsABCc@s�eZdZdZeddd��Zeddd��Zeddd	��Zedd
d��Zeddd
��Z	eddd��Z
eddd��Zeddd��Zeddd��Z
dS)�Androidz�
    Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>` and
    `version <platformdirs.api.PlatformDirsABC.version>`.
    �return�strcC�|�t�d�S)zd:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``�files��_append_app_name_and_version�_android_folder��self�r�B/usr/lib/python3/dist-packages/pip/_vendor/platformdirs/android.py�
user_data_dir�zAndroid.user_data_dircC�|jS)z@:return: data directory shared by users, same as `user_data_dir`�rrrrr�
site_data_dir�zAndroid.site_data_dircCr	)z
        :return: config directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
        �shared_prefsrrrrr�user_config_dirszAndroid.user_config_dircCr)zH:return: config directory shared by the users, same as `user_config_dir`)rrrrr�site_config_dir#rzAndroid.site_config_dircCr	)zj:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``�cacherrrrr�user_cache_dir(rzAndroid.user_cache_dircCr)zB:return: state directory tied to the user, same as `user_data_dir`rrrrr�user_state_dir-rzAndroid.user_state_dircC�|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#rrr�user_log_dir2�zAndroid.user_log_dircCst�S)zf
        :return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``
        )�_android_documents_folderrrrr�user_documents_dir=szAndroid.user_documents_dircCr)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%rrr�user_runtime_dirDr'zAndroid.user_runtime_dirN�rr)�__name__�
__module__�__qualname__�__doc__�propertyrrrrrrr&r)r+rrrrrs(
r)�maxsizerrcCsxzddlm}|d�}|������}W|Sty;t�d�}tj	D]}|�
|�r6|�d�d}Y|Sq$td��w)z':return: base folder for the Android OSr��	autoclass�android.content.Contextz /data/(data|user/\d+)/(.+)/filesz/filesz&Cannot find path to android app folder)
�jniusr4�getFilesDir�
getParentFile�getAbsolutePath�	Exception�re�compile�sysr#�match�split�OSError)r4�Context�result�patternr#rrrr
Ps
�


��r
cCsLzddlm}|d�}|d�}|�|j���}W|Sty%d}Y|Sw)z,:return: documents folder for the Android OSrr3r5zandroid.os.Environmentz/storage/emulated/0/Documents)r6r4�getExternalFilesDir�DIRECTORY_DOCUMENTSr9r:)r4rA�Environment�
documents_dirrrrr(es��r(r,)
�
__future__rr"r;r=�	functoolsr�apirrr
r(�__all__rrrr�<module>sE�