B
8r @ s d dl mZ d dlZd dlZd dlmZ d dlmZ ddlm Z G dd de Z
d d d
ddZd d d
d
dZd d d
ddZ
ddddZedde ZdgZdS ) )annotationsN) lru_cache)Callable )PlatformDirsABCc @ s e Zd ZdZeddddZdddddd d
dZedddd
ZeddddZeddddZ eddddZ
eddddZeddddZeddddZ
eddddZdS )Windowsa `MSDN on where to store app data files
`_.
Makes use of the
`appname `,
`appauthor `,
`version `,
`roaming `,
`opinion `.str)returnc C s( | j r
dnd}tjt|}| |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_APPDATACSIDL_LOCAL_APPDATA)roamingospathnormpathget_win_folder
_append_parts)selfconstr 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 appauthorappendopinionversionr
r join)r r r paramsauthorr r r r s
zWindows._append_partsc C s t jtd}| |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 jtd}| j|ddS )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 jtdS )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 jt jtdd}| |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" r# r% r&