| 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 : |
3
�N�a � @ s� d dl Z d dlZd dlmZ d dlmZmZ ddlmZ G dd� de�Z e
e
d�d d
�Ze
e
d�dd�Ze
e
d�d
d�Z
ee
ge
f d�dd�Zedd�e� �ZdgZdS )� N)� lru_cache)�Callable�Optional� )�PlatformDirsABCc @ s� e Zd ZdZeed�dd��Zdd�eee ed�dd �Zeed�d
d��Z eed�dd
��Z
eed�dd��Zeed�dd��Zeed�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>`.)�returnc C s( | j r
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_dir s zWindows.user_data_dirN)�
opinion_value)r r r c C sr g }| j r`| jdk r*| jp| j }|j|� |j| j � |d k rN| jrN|j|� | jr`|j| j� tjj|f|�� S )NF)ZappnameZ appauthor�append�opinion�versionr r �join)r r r �paramsZauthorr r r r s
zWindows._append_partsc C s t jjtd��}| j|�S )zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``�CSIDL_COMMON_APPDATA)r r r
r r )r r r r r �
site_data_dir+ s zWindows.site_data_dirc C s | j S )zC:return: config directory tied to the user, same as `user_data_dir`)r )r r r r �user_config_dir1 s zWindows.user_config_dirc C s | j S )zF:return: config directory shared by the users, same as `site_data_dir`)r )r r r r �site_config_dir6 s zWindows.site_config_dirc C s t jjtd��}| 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 )r r r
r r )r r r r r �user_cache_dir; s zWindows.user_cache_dirc C s | j S )zB:return: state directory tied to the user, same as `user_data_dir`)r )r r r r �user_state_dirD s zWindows.user_state_dirc C s | 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)r r r r r )r r r r r �user_log_dirI s zWindows.user_log_dirc C s t jjtd��S )z`
:return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``
�CSIDL_PERSONAL)r r r
r )r r r r �user_documents_dirS s zWindows.user_documents_dirc C s$ t jjt jjtd�d��}| j|�S )z�
:return: runtime directory tied to the user, e.g.
``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``
r
ZTemp)r r r
r r r )r r r r r �user_runtime_dirZ s zWindows.user_runtime_dir)�__name__�
__module__�__qualname__�__doc__�property�strr r r r r r r r r! r# r$ r r r r r s(
r )�
csidl_namer c C sr | dkr$t jjt jjt jd �d�S dddd�j| �}|dkrLtd | � ���t jj|�}|dkrntd
|� ���|S )z&Get folder from environment variables.r"