h$vdZddlmZddlZddlmZmZddlmZddl m Z e rddl m Z m Z Gdd eZ dS) z Base API.) annotationsN)ABCabstractmethod)Path) TYPE_CHECKING)IteratorLiteralceZdZdZ dDdEdZdFdZdGdZdHdZee dIdZ ee dIdZ ee dIdZ ee dIdZ ee dIdZee dIdZee dId Zee dId!Zee dId"Zee dId#Zee dId$Zee dId%Zee dId&Zee dId'Zee dId(Zee dId)ZedJd*ZedJd+ZedJd,ZedJd-ZedJd.ZedJd/ZedJd0Z edJd1Z!edJd2Z"edJd3Z#edJd4Z$edJd5Z%edJd6Z&edJd7Z'edJd8Z(edJd9Z)dKd;Z*dKd<Z+dKd=Z,dKd>Z-dLd@Z.dLdAZ/dLdBZ0dLdCZ1dS)MPlatformDirsABCz-Abstract base class for platform directories.NFTappname str | None appauthorstr | None | Literal[False]versionroamingbool multipathopinion ensure_existsreturnNonecp||_||_ ||_ ||_ ||_ ||_||_dS)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)r rrrrrr)selfr rrrrrrs |/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/platformdirs/api.py__init__zPlatformDirsABC.__init__s\, "     #  *  basestrct|dd}|jr;||j|jr||jt jj|dg|R}|||S)Nr)listr appendrospathjoin_optionally_create_directory)rrparamsr$s r_append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionPsd122h < , MM$, ' ' '| , dl+++w|DG-f--- ))$/// rr$c`|jr&t|dddSdS)NT)parentsexist_ok)rrmkdirrr$s rr&z,PlatformDirsABC._optionally_create_directoryZs<   : JJ  TD  9 9 9 9 9 : :r directoryrcx|jr%|tjd}t |S)Nr)rsplitr#pathsepr)rr.s r _first_item_as_path_if_multipathz0PlatformDirsABC._first_item_as_path_if_multipath^s0 > 7! 33A6IIrcdS)z(:return: data directory tied to the userNrs r user_data_dirzPlatformDirsABC.user_data_dirdrcdS)z':return: data directory shared by usersNr4r5s r site_data_dirzPlatformDirsABC.site_data_dirir7rcdS)z*:return: config directory tied to the userNr4r5s ruser_config_dirzPlatformDirsABC.user_config_dirnr7rcdS)z-:return: config directory shared by the usersNr4r5s rsite_config_dirzPlatformDirsABC.site_config_dirsr7rcdS)z):return: cache directory tied to the userNr4r5s ruser_cache_dirzPlatformDirsABC.user_cache_dirxr7rcdS)z(:return: cache directory shared by usersNr4r5s rsite_cache_dirzPlatformDirsABC.site_cache_dir}r7rcdS)z):return: state directory tied to the userNr4r5s ruser_state_dirzPlatformDirsABC.user_state_dirr7rcdS)z':return: log directory tied to the userNr4r5s r user_log_dirzPlatformDirsABC.user_log_dirr7rcdS)z-:return: documents directory tied to the userNr4r5s ruser_documents_dirz"PlatformDirsABC.user_documents_dirr7rcdS)z-:return: downloads directory tied to the userNr4r5s ruser_downloads_dirz"PlatformDirsABC.user_downloads_dirr7rcdS)z,:return: pictures directory tied to the userNr4r5s ruser_pictures_dirz!PlatformDirsABC.user_pictures_dirr7rcdS)z*:return: videos directory tied to the userNr4r5s ruser_videos_dirzPlatformDirsABC.user_videos_dirr7rcdS)z):return: music directory tied to the userNr4r5s ruser_music_dirzPlatformDirsABC.user_music_dirr7rcdS)z+:return: desktop directory tied to the userNr4r5s ruser_desktop_dirz PlatformDirsABC.user_desktop_dirr7rcdS)z+:return: runtime directory tied to the userNr4r5s ruser_runtime_dirz PlatformDirsABC.user_runtime_dirr7rcdS)z*:return: runtime directory shared by usersNr4r5s rsite_runtime_dirz PlatformDirsABC.site_runtime_dirr7rc*t|jS)z#:return: data path tied to the user)rr6r5s ruser_data_pathzPlatformDirsABC.user_data_pathD&'''rc*t|jS)z":return: data path shared by users)rr9r5s rsite_data_pathzPlatformDirsABC.site_data_pathrXrc*t|jS)z%:return: config path tied to the user)rr;r5s ruser_config_pathz PlatformDirsABC.user_config_pathD()))rc*t|jS)z(:return: config path shared by the users)rr=r5s rsite_config_pathz PlatformDirsABC.site_config_pathr]rc*t|jS)z$:return: cache path tied to the user)rr?r5s ruser_cache_pathzPlatformDirsABC.user_cache_pathD'(((rc*t|jS)z#:return: cache path shared by users)rrAr5s rsite_cache_pathzPlatformDirsABC.site_cache_pathrbrc*t|jS)z$:return: state path tied to the user)rrCr5s ruser_state_pathzPlatformDirsABC.user_state_pathrbrc*t|jS)z":return: log path tied to the user)rrEr5s r user_log_pathzPlatformDirsABC.user_log_pathsD%&&&rc*t|jS)z*:return: documents a path tied to the user)rrGr5s ruser_documents_pathz#PlatformDirsABC.user_documents_pathD+,,,rc*t|jS)z(:return: downloads path tied to the user)rrIr5s ruser_downloads_pathz#PlatformDirsABC.user_downloads_pathrkrc*t|jS)z':return: pictures path tied to the user)rrKr5s ruser_pictures_pathz"PlatformDirsABC.user_pictures_pathsD*+++rc*t|jS)z%:return: videos path tied to the user)rrMr5s ruser_videos_pathz PlatformDirsABC.user_videos_pathr]rc*t|jS)z$:return: music path tied to the user)rrOr5s ruser_music_pathzPlatformDirsABC.user_music_pathrbrc*t|jS)z&:return: desktop path tied to the user)rrQr5s ruser_desktop_pathz!PlatformDirsABC.user_desktop_pathD)***rc*t|jS)z&:return: runtime path tied to the user)rrSr5s ruser_runtime_pathz!PlatformDirsABC.user_runtime_pathrvrc*t|jS)z%:return: runtime path shared by users)rrUr5s rsite_runtime_pathz!PlatformDirsABC.site_runtime_pathrvr Iterator[str]c#.K|jV|jVdS)z4:yield: all user and site configuration directories.N)r;r=r5s riter_config_dirsz PlatformDirsABC.iter_config_dirss*""""""""""rc#.K|jV|jVdS)z+:yield: all user and site data directories.N)r6r9r5s riter_data_dirszPlatformDirsABC.iter_data_dirs s*          rc#.K|jV|jVdS)z,:yield: all user and site cache directories.N)r?rAr5s riter_cache_dirszPlatformDirsABC.iter_cache_dirss*!!!!!!!!!!rc#.K|jV|jVdS)z.:yield: all user and site runtime directories.N)rSrUr5s riter_runtime_dirsz!PlatformDirsABC.iter_runtime_dirss*##########rIterator[Path]c#ZK|D]}t|VdS)z.:yield: all user and site configuration paths.N)r}rr-s riter_config_pathsz!PlatformDirsABC.iter_config_pathss@))++  Dt**      rc#ZK|D]}t|VdS)z%:yield: all user and site data paths.N)rrr-s riter_data_pathszPlatformDirsABC.iter_data_pathss@''))  Dt**      rc#ZK|D]}t|VdS)z&:yield: all user and site cache paths.N)rrr-s riter_cache_pathsz PlatformDirsABC.iter_cache_paths"s@((**  Dt**      rc#ZK|D]}t|VdS)z(:yield: all user and site runtime paths.N)rrr-s riter_runtime_pathsz"PlatformDirsABC.iter_runtime_paths's@**,,  Dt**      r)NNNFFTF)r r rrrr rrrrrrrrrr)rrrr)r$rrr)r.rrr)rr)rr)rr{)rr)2__name__ __module__ __qualname____doc__rr(r&r2propertyrr6r9r;r=r?rArCrErGrIrKrMrOrQrSrUrWrZr\r_rardrfrhrjrmrorqrsrurxrzr}rrrrrrrr4rrr r s77#15"#= = = = = ~:::: 777^X7666^X6999^X9<<<^X<888^X8777^X7888^X8666^X6<<<^X<<<<^X<;;;^X;999^X9888^X8:::^X::::^X:999^X9(((X((((X(***X****X*)))X))))X))))X)'''X'---X----X-,,,X,***X*)))X)+++X++++X++++X+#### !!!! """" $$$$    rr )r __future__rr#abcrrpathlibrtypingrrr r r4rrrs"""""" ######## )((((((((\\\\\c\\\\\r