403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.6/site-packages/pip/_vendor/platformdirs/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.6/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-36.pyc
3

�N�a��@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ej
jd�rZddlmZne
d	�d
d�ZGdd
�d
e	�Zeeed�dd�Zd
gZdS)�N)�ConfigParser)�Path)�Optional�)�PlatformDirsABC�linux)�getuid)�returncCstd��dS)Nzshould only be used on Linux)�RuntimeError�rr�/usr/lib/python3.6/unix.pyr
src@s�eZdZdZeed�dd��Zeed�dd��Zeed�dd	�Zeed�d
d��Z	eed�dd
��Z
eed�dd��Zeed�dd��Zeed�dd��Z
eed�dd��Zeed�dd��Zeed�dd��Zeed�dd��Zeed�dd�ZdS) �UnixaD
    On Unix/Linux, we follow the
    `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
    overriding directories with environment variables. The examples show are the default values, alongside the name of
    the environment variable that overrides them. Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `multipath <platformdirs.api.PlatformDirsABC.multipath>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
    )r	cCs,tjjdd�}|j�s"tjjd�}|j|�S)z�
        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
         ``$XDG_DATA_HOME/$appname/$version``
        Z
XDG_DATA_HOME�z~/.local/share)�os�environ�get�strip�path�
expanduser�_append_app_name_and_version)�selfrrrr�
user_data_dirszUnix.user_data_dircCs.tjjdd�}|j�s$dtj�d�}|j|�S)aY
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
        Z
XDG_DATA_DIRSrz/usr/local/sharez
/usr/share)rrrr�pathsep�_with_multi_path)rrrrr�
site_data_dir(szUnix.site_data_dir)rr	cs<|jtj�}�js|dd�}�fdd�|D�}tjj|�S)Nrrcsg|]}�jtjj|���qSr)rrrr)�.0�p)rrr�
<listcomp>9sz)Unix._with_multi_path.<locals>.<listcomp>)�splitrr�	multipath�join)rr�	path_listr)rrr5s
zUnix._with_multi_pathcCs,tjjdd�}|j�s"tjjd�}|j|�S)z�
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        ZXDG_CONFIG_HOMErz	~/.config)rrrrrrr)rrrrr�user_config_dir<szUnix.user_config_dircCs$tjjdd�}|j�sd}|j|�S)a/
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/etc/xdg/$appname/$version``
        ZXDG_CONFIG_DIRSrz/etc/xdg)rrrrr)rrrrr�site_config_dirGszUnix.site_config_dircCs,tjjdd�}|j�s"tjjd�}|j|�S)z�
        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
         ``~/$XDG_CACHE_HOME/$appname/$version``
        ZXDG_CACHE_HOMErz~/.cache)rrrrrrr)rrrrr�user_cache_dirTszUnix.user_cache_dircCs,tjjdd�}|j�s"tjjd�}|j|�S)z�
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        ZXDG_STATE_HOMErz~/.local/state)rrrrrrr)rrrrr�user_state_dir_szUnix.user_state_dircCs|j}|jrtjj|d�}|S)zx
        :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``log`` in it
        �log)r$Zopinionrrr )rrrrr�user_log_dirjszUnix.user_log_dircCs6td�}|dkr2tjjdd�j�}|s2tjjd�}|S)zU
        :return: documents directory tied to the user, e.g. ``~/Documents``
        ZXDG_DOCUMENTS_DIRNrz~/Documents)�_get_user_dirs_folderrrrrrr)rZ
documents_dirrrr�user_documents_dirtszUnix.user_documents_dircCs,tjjdd�}|j�s"dt���}|j|�S)z�
        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
         ``$XDG_RUNTIME_DIR/$appname/$version``
        ZXDG_RUNTIME_DIRrz
/run/user/)rrrrrr)rrrrr�user_runtime_dir�szUnix.user_runtime_dircCs|j|j�S)zd:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``)� _first_item_as_path_if_multipathr)rrrr�site_data_path�szUnix.site_data_pathcCs|j|j�S)zj:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``)r+r#)rrrr�site_config_path�szUnix.site_config_path)�	directoryr	cCs|jr|jtj�d}t|�S)Nr)rrrrr)rr.rrrr+�sz%Unix._first_item_as_path_if_multipathN)�__name__�
__module__�__qualname__�__doc__�property�strrrrr"r#r$r%r'r)r*rr,r-r+rrrrr
s2




	
r
)�keyr	cCs�tjjt�jd�}tjj|�r�t�}t|��}|jd|j	����WdQRX||dkr\dS|d|j
d�}|jdtjjd��}|SdS)zjReturn directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/zuser-dirs.dirsz[top]
N�top�"z$HOME�~)
rrr r
r"�existsr�openZread_string�readr�replacer)r5Zuser_dirs_config_path�parser�streamrrrrr(�s
r()r�sysZconfigparserrZpathlibrZtypingrZapir�platform�
startswithr�intr
r4r(�__all__rrrr�<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit