K iA$vdZddlmZddlZddlmZmZddlmZddl m Z e r ddl m Z ddl m Z Gd d eZy) z Base API.) annotationsN)ABCabstractmethod)Path) TYPE_CHECKING)Iterator)Literalc~eZdZdZ d/ d0dZd1dZd2dZd3dZee d4dZ ee d4dZ ee d4d Z ee d4d Z ee d4d Zee d4d Zee d4d Zee d4dZee d4dZee d4dZee d4dZee d4dZee d4dZee d4dZee d4dZee d4dZed5dZed5dZed5dZed5dZed5dZed5dZed5dZ ed5dZ!ed5dZ"ed5d Z#ed5d!Z$ed5d"Z%ed5d#Z&ed5d$Z'ed5d%Z(ed5d&Z)d6d'Z*d6d(Z+d6d)Z,d6d*Z-d7d+Z.d7d,Z/d7d-Z0d7d.Z1y)8PlatformDirsABCz-Abstract base class for platform directories.Ncn||_||_ ||_ ||_ ||_ ||_||_y)aY Create a new platform directory. :param appname: See `appname`. :param appauthor: See `appauthor`. :param version: See `version`. :param roaming: See `roaming`. :param multipath: See `multipath`. :param opinion: See `opinion`. :param ensure_exists: See `ensure_exists`. N)appname appauthorversionroaming multipathopinion ensure_exists)selfr rrrrrrs V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/platformdirs/api.py__init__zPlatformDirsABC.__init__sW, "     #  * c&t|dd}|jrB|j|j|jr|j|jt j j |dg|}|j||S)Nr)listr appendrospathjoin_optionally_create_directory)rbaseparamsrs r_append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionQsmd12h << MM$,, '|| dll+ww||DG-f- ))$/ rcV|jrt|jddyy)NT)parentsexist_ok)rrmkdirrrs rrz,PlatformDirsABC._optionally_create_directory[s'    J  TD  9 rct|jr"|jtjd}t |S)Nr)r partitionrpathsepr)r directorys r _first_item_as_path_if_multipathz0PlatformDirsABC._first_item_as_path_if_multipath_s, >>!++BJJ7:IIrcy)z(:return: data directory tied to the userNrs r user_data_dirzPlatformDirsABC.user_data_dirercy)z':return: data directory shared by usersNr.r/s r site_data_dirzPlatformDirsABC.site_data_dirjr1rcy)z*:return: config directory tied to the userNr.r/s ruser_config_dirzPlatformDirsABC.user_config_diror1rcy)z-:return: config directory shared by the usersNr.r/s rsite_config_dirzPlatformDirsABC.site_config_dirtr1rcy)z):return: cache directory tied to the userNr.r/s ruser_cache_dirzPlatformDirsABC.user_cache_diryr1rcy)z(:return: cache directory shared by usersNr.r/s rsite_cache_dirzPlatformDirsABC.site_cache_dir~r1rcy)z):return: state directory tied to the userNr.r/s ruser_state_dirzPlatformDirsABC.user_state_dirr1rcy)z':return: log directory tied to the userNr.r/s r user_log_dirzPlatformDirsABC.user_log_dirr1rcy)z-:return: documents directory tied to the userNr.r/s ruser_documents_dirz"PlatformDirsABC.user_documents_dirr1rcy)z-:return: downloads directory tied to the userNr.r/s ruser_downloads_dirz"PlatformDirsABC.user_downloads_dirr1rcy)z,:return: pictures directory tied to the userNr.r/s ruser_pictures_dirz!PlatformDirsABC.user_pictures_dirr1rcy)z*:return: videos directory tied to the userNr.r/s ruser_videos_dirzPlatformDirsABC.user_videos_dirr1rcy)z):return: music directory tied to the userNr.r/s ruser_music_dirzPlatformDirsABC.user_music_dirr1rcy)z+:return: desktop directory tied to the userNr.r/s ruser_desktop_dirz PlatformDirsABC.user_desktop_dirr1rcy)z+:return: runtime directory tied to the userNr.r/s ruser_runtime_dirz PlatformDirsABC.user_runtime_dirr1rcy)z*:return: runtime directory shared by usersNr.r/s rsite_runtime_dirz PlatformDirsABC.site_runtime_dirr1rc,t|jS)z#:return: data path tied to the user)rr0r/s ruser_data_pathzPlatformDirsABC.user_data_pathD&&''rc,t|jS)z":return: data path shared by users)rr3r/s rsite_data_pathzPlatformDirsABC.site_data_pathrRrc,t|jS)z%:return: config path tied to the user)rr5r/s ruser_config_pathz PlatformDirsABC.user_config_pathD(())rc,t|jS)z(:return: config path shared by the users)rr7r/s rsite_config_pathz PlatformDirsABC.site_config_pathrWrc,t|jS)z$:return: cache path tied to the user)rr9r/s ruser_cache_pathzPlatformDirsABC.user_cache_pathD''((rc,t|jS)z#:return: cache path shared by users)rr;r/s rsite_cache_pathzPlatformDirsABC.site_cache_pathr\rc,t|jS)z$:return: state path tied to the user)rr=r/s ruser_state_pathzPlatformDirsABC.user_state_pathr\rc,t|jS)z":return: log path tied to the user)rr?r/s r user_log_pathzPlatformDirsABC.user_log_pathsD%%&&rc,t|jS)z*:return: documents a path tied to the user)rrAr/s ruser_documents_pathz#PlatformDirsABC.user_documents_pathD++,,rc,t|jS)z(:return: downloads path tied to the user)rrCr/s ruser_downloads_pathz#PlatformDirsABC.user_downloads_pathrerc,t|jS)z':return: pictures path tied to the user)rrEr/s ruser_pictures_pathz"PlatformDirsABC.user_pictures_pathsD**++rc,t|jS)z%:return: videos path tied to the user)rrGr/s ruser_videos_pathz PlatformDirsABC.user_videos_pathrWrc,t|jS)z$:return: music path tied to the user)rrIr/s ruser_music_pathzPlatformDirsABC.user_music_pathr\rc,t|jS)z&:return: desktop path tied to the user)rrKr/s ruser_desktop_pathz!PlatformDirsABC.user_desktop_pathD))**rc,t|jS)z&:return: runtime path tied to the user)rrMr/s ruser_runtime_pathz!PlatformDirsABC.user_runtime_pathrprc,t|jS)z%:return: runtime path shared by users)rrOr/s rsite_runtime_pathz!PlatformDirsABC.site_runtime_pathrprc#DK|j|jyw)z4:yield: all user and site configuration directories.N)r5r7r/s riter_config_dirsz PlatformDirsABC.iter_config_dirss"""""" c#DK|j|jyw)z+:yield: all user and site data directories.N)r0r3r/s riter_data_dirszPlatformDirsABC.iter_data_dirs s      rwc#DK|j|jyw)z,:yield: all user and site cache directories.N)r9r;r/s riter_cache_dirszPlatformDirsABC.iter_cache_dirss!!!!!!rwc#DK|j|jyw)z.:yield: all user and site runtime directories.N)rMrOr/s riter_runtime_dirsz!PlatformDirsABC.iter_runtime_dirss######rwc#PK|jD]}t|yw)z.:yield: all user and site configuration paths.N)rvrr's riter_config_pathsz!PlatformDirsABC.iter_config_pathss())+ Dt*  $&c#PK|jD]}t|yw)z%:yield: all user and site data paths.N)ryrr's riter_data_pathszPlatformDirsABC.iter_data_pathss('') Dt*  rc#PK|jD]}t|yw)z&:yield: all user and site cache paths.N)r{rr's riter_cache_pathsz PlatformDirsABC.iter_cache_paths#s(((* Dt*  rc#PK|jD]}t|yw)z(:yield: all user and site runtime paths.N)r}rr's riter_runtime_pathsz"PlatformDirsABC.iter_runtime_paths(s(**, Dt*  r)NNNFFTF)r str | Nonerzstr | Literal[False] | NonerrrboolrrrrrrreturnNone)r strrr)rrrr)r+rrr)rr)rr)rz Iterator[str])rzIterator[Path])2__name__ __module__ __qualname____doc__rr"rr,propertyrr0r3r5r7r9r;r=r?rArCrErGrIrKrMrOrQrTrVrYr[r^r`rbrdrgrirkrmrorrrtrvryr{r}rrrrr.rrr r s7#15"#= = /=  =  =  = = =  = ~: 776699<<88778866<<<<;;9988::::99((((****))))))''----,,**))++++++# ! " $    rr )r __future__rrabcrrpathlibrtypingrcollections.abcrr r r.rrrs." # (\c\r