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__/windows.cpython-36.pyc
3

�N�a�@s�ddlZddlZddlmZddlmZmZddlmZGdd�de�Z	e
e
d�d	d
�Ze
e
d�dd�Ze
e
d�d
d�Z
ee
ge
fd�dd�Zedd�e��ZdgZdS)�N)�	lru_cache)�Callable�Optional�)�PlatformDirsABCc@s�eZdZdZeed�dd��Zdd�eeeed�dd	�Zeed�d
d��Z	eed�dd
��Z
eed�dd��Zeed�dd��Zeed�dd��Z
eed�dd��Zeed�dd��Zeed�dd��ZdS)�Windowsa�`MSDN on where to store app data files
    <http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120>`_.
    Makes use of the
    `appname <platformdirs.api.PlatformDirsABC.appname>`,
    `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`,
    `version <platformdirs.api.PlatformDirsABC.version>`,
    `roaming <platformdirs.api.PlatformDirsABC.roaming>`,
    `opinion <platformdirs.api.PlatformDirsABC.opinion>`.)�returncCs(|jr
dnd}tjjt|��}|j|�S)z�
        :return: data directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or
         ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)
        �
CSIDL_APPDATA�CSIDL_LOCAL_APPDATA)Zroaming�os�path�normpath�get_win_folder�
_append_parts)�self�constr�r�/usr/lib/python3.6/windows.py�
user_data_dirszWindows.user_data_dirN)�
opinion_value)rrrcCsrg}|jr`|jdk	r*|jp|j}|j|�|j|j�|dk	rN|jrN|j|�|jr`|j|j�tjj|f|��S)NF)ZappnameZ	appauthor�append�opinion�versionrr�join)rrr�paramsZauthorrrrrs


zWindows._append_partscCstjjtd��}|j|�S)zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``�CSIDL_COMMON_APPDATA)rrr
rr)rrrrr�
site_data_dir+szWindows.site_data_dircCs|jS)zC:return: config directory tied to the user, same as `user_data_dir`)r)rrrr�user_config_dir1szWindows.user_config_dircCs|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r)rrrr�site_config_dir6szWindows.site_config_dircCstjjtd��}|j|dd�S)z�
        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
         ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``
        r
ZCache)r)rrr
rr)rrrrr�user_cache_dir;szWindows.user_cache_dircCs|jS)zB:return: state directory tied to the user, same as `user_data_dir`)r)rrrr�user_state_dirDszWindows.user_state_dircCs|j}|jrtjj|d�}|S)zy
        :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it
        ZLogs)rrrrr)rrrrr�user_log_dirIszWindows.user_log_dircCstjjtd��S)z`
        :return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``
        �CSIDL_PERSONAL)rrr
r)rrrr�user_documents_dirSszWindows.user_documents_dircCs$tjjtjjtd�d��}|j|�S)z�
        :return: runtime directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``
        r
ZTemp)rrr
rrr)rrrrr�user_runtime_dirZszWindows.user_runtime_dir)�__name__�
__module__�__qualname__�__doc__�property�strrrrrrrrr r!r#r$rrrrr	s(

	r)�
csidl_namercCsr|dkr$tjjtjjtjd�d�Sdddd�j|�}|dkrLtd	|����tjj|�}|dkrntd
|����|S)z&Get folder from environment variables.r"ZUSERPROFILEZ	Documents�APPDATAZALLUSERSPROFILEZLOCALAPPDATA)r	rr
NzUnknown CSIDL name: zUnset environment variable: )rrrr
�environ�get�
ValueError)r+Zenv_var_name�resultrrr�get_win_folder_from_env_varsdsr1cCsXddddd�j|�}|dkr*td|����ddl}|j|jd	�}|j||�\}}t|�S)
z�Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the
    registry for this guarantees us the correct answer for all CSIDL_*
    names.
    ZAppDatazCommon AppDataz
Local AppDataZPersonal)r	rr
r"NzUnknown CSIDL name: rz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)r.r/�winreg�OpenKey�HKEY_CURRENT_USERZQueryValueExr*)r+Zshell_folder_namer2�keyZ	directory�_rrr�get_win_folder_from_registryvsr7cCs�ddddd�j|�}|dkr*td|����tjd�}ttd	�}|jjd|dd
|�tdd�|D��r�tjd�}|jj	|j
|d�r�|}|j
S)
zGet folder with ctypes.��#��)r	rr
r"NzUnknown CSIDL name: i�windllrcss|]}t|�dkVqdS)�N)�ord)�.0�crrr�	<genexpr>�sz,get_win_folder_via_ctypes.<locals>.<genexpr>)r.r/�ctypesZcreate_unicode_buffer�getattrZshell32ZSHGetFolderPathW�anyZkernel32ZGetShortPathNameW�value)r+Zcsidl_const�bufr<Zbuf2rrr�get_win_folder_via_ctypes�s


rG)rcCs8ttd�rtSyddl}Wntk
r.tSXtSdS)Nr<r)�hasattrrBrGr2�ImportErrorr1r7)r2rrr�_pick_get_win_folder�s
rJ)�maxsize)rBr�	functoolsrZtypingrrZapirrr*r1r7rGrJr�__all__rrrr�<module>s[

Youez - 2016 - github.com/yon3zu
LinuXploit