/opt/alt/python37/lib/python3.7/site-packages/platformdirs/__pycache__
NameSizeModeActions
android.cpython-37.opt-1.pyc43470644editdlrm
android.cpython-37.pyc43470644editdlrm
api.cpython-37.opt-1.pyc51820644editdlrm
api.cpython-37.pyc51820644editdlrm
macos.cpython-37.opt-1.pyc32930644editdlrm
macos.cpython-37.pyc32930644editdlrm
unix.cpython-37.opt-1.pyc70580644editdlrm
unix.cpython-37.pyc70580644editdlrm
version.cpython-37.opt-1.pyc2560644editdlrm
version.cpython-37.pyc2560644editdlrm
windows.cpython-37.opt-1.pyc64190644editdlrm
windows.cpython-37.pyc64190644editdlrm
__init__.cpython-37.opt-1.pyc109310644editdlrm
__init__.cpython-37.pyc109310644editdlrm
__main__.cpython-37.opt-1.pyc11830644editdlrm
__main__.cpython-37.pyc11830644editdlrm
Edit: /opt/alt/python37/lib/python3.7/site-packages/platformdirs/__pycache__/windows.cpython-37.pyc (6419B)
B Ĥa'@sddlmZddlZddlZddlmZddlmZddlm Z Gddde Z d d d d d Z d d d d dZ d d d ddZ ddddZeddeZdgZdS)) annotationsN) lru_cache)Callable)PlatformDirsABCc@seZdZdZeddddZdddddd d d Zeddd d ZeddddZeddddZ eddddZ eddddZ eddddZ eddddZ eddddZdS)Windowsa`MSDN on where to store app data files `_. Makes use of the `appname `, `appauthor `, `version `, `roaming `, `opinion `.str)returncCs(|jr 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)Zroamingospathnormpathget_win_folder _append_parts)selfconstr rE/opt/alt/python37/lib/python3.7/site-packages/platformdirs/windows.py user_data_dirszWindows.user_data_dirN) opinion_valuez str | None)r rr cCsrg}|jr`|jdk r*|jp|j}||||j|dk rN|jrN|||jr`||jtjj|f|S)NF)ZappnameZ appauthorappendopinionversionr r join)rr rZparamsZauthorrrrr s      zWindows._append_partscCstjtd}||S)zT:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``CSIDL_COMMON_APPDATA)r r rrr)rr rrr site_data_dir-szWindows.site_data_dircCs|jS)zC:return: config directory tied to the user, same as `user_data_dir`)r)rrrruser_config_dir3szWindows.user_config_dircCs|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r)rrrrsite_config_dir8szWindows.site_config_dircCstjtd}|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 ZCache)r)r r rrr)rr rrruser_cache_dir=szWindows.user_cache_dircCs|jS)zB:return: state directory tied to the user, same as `user_data_dir`)r)rrrruser_state_dirFszWindows.user_state_dircCs|j}|jrtj|d}|S)zy :return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it ZLogs)rrr r r)rr rrr user_log_dirKszWindows.user_log_dircCstjtdS)z` :return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents`` CSIDL_PERSONAL)r r rr)rrrruser_documents_dirUszWindows.user_documents_dircCs$tjtjtdd}||S)z :return: runtime directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname`` r ZTemp)r r rrrr)rr rrruser_runtime_dir\szWindows.user_runtime_dir)__name__ __module__ __qualname____doc__propertyrrrrrrr r!r#r$rrrrr s    rr) csidl_namer cCsr|dkr$tjtjtjddSdddd|}|dkrLtd |tj|}|dkrntd ||S) z&Get folder from environment variables.r"Z USERPROFILEZ DocumentsAPPDATAZALLUSERSPROFILEZ LOCALAPPDATA)r rr NzUnknown CSIDL name: zUnset environment variable: )r r rrenvironget ValueError)r*Z env_var_nameresultrrrget_win_folder_from_env_varsfs r0cCsXddddd|}|dkr*td|ddl}||jd }|||\}}t|S) zGet 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.winregOpenKeyHKEY_CURRENT_USERZ QueryValueExr)r*Zshell_folder_namer1keyZ directory_rrrget_win_folder_from_registryxsr6cCsddddd|}|dkr*td|td}ttd }|jd|dd |td d |Drtd}|j |j |dr|}|j S) zGet folder with ctypes.#)r rr r"NzUnknown CSIDL name: iwindllrcss|]}t|dkVqdS)N)ord).0crrr sz,get_win_folder_via_ctypes..) r-r.ctypesZcreate_unicode_buffergetattrZshell32ZSHGetFolderPathWanyZkernel32ZGetShortPathNameWvalue)r*Z csidl_constZbufr;Zbuf2rrrget_win_folder_via_ctypess   rEzCallable[[str], str])r cCs8ttdrtSy ddl}Wntk r.tSXtSdS)Nr;r)hasattrrArEr1 ImportErrorr0r6)r1rrr_pick_get_win_folders  rH)maxsize)Z __future__rrAr functoolsrtypingrZapirrr0r6rErHr__all__rrrrs    [