AlkantarClanX12
Current Path : /opt/alt/python37/lib/python3.7/site-packages/platformdirs/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/platformdirs/__pycache__/windows.cpython-37.pyc |
B Ĥ�a' � @ s� d dl mZ d dlZd dlZd dlmZ d dlmZ ddlm Z G dd� de �Z d d d �dd�Zd d d �d d�Zd d d �dd�Z dd�dd�Zedd�e� �ZdgZdS )� )�annotationsN)� lru_cache)�Callable� )�PlatformDirsABCc @ s� e Zd ZdZedd�dd��Zdd�dddd �d d�Zedd�dd ��Zedd�dd��Zedd�dd��Z edd�dd��Z edd�dd��Zedd�dd��Zedd�dd��Z edd�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>`.�str)�returnc C s( | j r 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)�roaming�os�path�normpath�get_win_folder� _append_parts)�self�constr � r �E/opt/alt/python37/lib/python3.7/site-packages/platformdirs/windows.py� user_data_dir s zWindows.user_data_dirN)� opinion_valuez str | None)r r r c C sr g }| j r`| jdk r*| jp| j }|�|� |�| j � |d k rN| jrN|�|� | jr`|�| j� tjj|f|�� S )NF)�appname� appauthor�append�opinion�versionr r �join)r r r �params�authorr r r r s zWindows._append_partsc C s t j�td��}| �|�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_dir3 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_dir8 s zWindows.site_config_dirc C s t j�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 �Cache)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_dirF s zWindows.user_state_dirc C s | j }| jrtj�|d�}|S )zy :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it �Logs)r r r r r )r r r r r �user_log_dirK s zWindows.user_log_dirc C s t j�td��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_dirU s zWindows.user_documents_dirc C s$ t j�t j�td�d��}| �|�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_dir\ s zWindows.user_runtime_dir)�__name__� __module__�__qualname__�__doc__�propertyr r r! r"