h pdZddlmZddlZddlZddlmZddlm Z erddl m Z Gdd e Z d gZ dS) zmacOS.) annotationsN) TYPE_CHECKING)PlatformDirsABC)PathceZdZdZeddZeddZeddZeddZedd Z edd Z edd Z edd Z edd Z eddZeddZeddZeddZeddZeddZeddZeddZeddZdS)MacOSa Platform directories for the macOS operating system. Follows the guidance from `Apple documentation `_. Makes use of the `appname `, `version `, `ensure_exists `. returnstrcf|tjdS)zb:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``z~/Library/Application Support_append_app_name_and_versionospath expanduserselfs ~/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/platformdirs/macos.py user_data_dirzMacOS.user_data_dirs)001C1CDc1d1deeec tjd}|r|dgng}||d|jrt j|S|dS)aB :return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``. If we're using a Python binary managed by `Homebrew `_, the directory will be under the Homebrew prefix, e.g. ``/opt/homebrew/share/$appname/$version``. If `multipath ` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``/opt/homebrew/share/$appname/$version:/Library/Application Support/$appname/$version`` /opt/homebrewz/opt/homebrew/sharez/Library/Application Supportr sysprefix startswithrappend multipathrpathsepjoinr is_homebrew path_lists r site_data_dirzMacOS.site_data_dir sj++O<< R]eT667LMMNNce ::;YZZ[[[ > .:??9-- -|rrc6||jS)zh:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``) _first_item_as_path_if_multipathr$rs rsite_data_pathzMacOS.site_data_path1s44T5GHHHrc|jS)zC:return: config directory tied to the user, same as `user_data_dir`rrs ruser_config_dirzMacOS.user_config_dir6 !!rc|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r$rs rsite_config_dirzMacOS.site_config_dir;r+rcf|tjdS)zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr rs ruser_cache_dirzMacOS.user_cache_dir@s)001C1CDV1W1WXXXrc tjd}|r|dgng}||d|jrt j|S|dS)a1 :return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. If we're using a Python binary managed by `Homebrew `_, the directory will be under the Homebrew prefix, e.g. ``/opt/homebrew/var/cache/$appname/$version``. If `multipath ` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``/opt/homebrew/var/cache/$appname/$version:/Library/Caches/$appname/$version`` rz/opt/homebrew/var/cachez/Library/Cachesrrr!s rsite_cache_dirzMacOS.site_cache_dirEsj++O<< VaiT667PQQRRgi ::;LMMNNN > .:??9-- -|rc6||jS)zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r&r1rs rsite_cache_pathzMacOS.site_cache_pathVs44T5HIIIrc|jS)zB:return: state directory tied to the user, same as `user_data_dir`r)rs ruser_state_dirzMacOS.user_state_dir[r+rcf|tjdS)zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr rs r user_log_dirzMacOS.user_log_dir`s)001C1CDT1U1UVVVrc@tjdS)zC:return: documents directory tied to the user, e.g. ``~/Documents``z ~/Documentsrrrrs ruser_documents_dirzMacOS.user_documents_direw!!-000rc@tjdS)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z ~/Downloadsr9rs ruser_downloads_dirzMacOS.user_downloads_dirjr;rc@tjdS)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z ~/Picturesr9rs ruser_pictures_dirzMacOS.user_pictures_dirosw!!,///rc@tjdS)z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr9rs ruser_videos_dirzMacOS.user_videos_dirtsw!!*---rc@tjdS)z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr9rs ruser_music_dirzMacOS.user_music_dirysw!!),,,rc@tjdS)z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z ~/Desktopr9rs ruser_desktop_dirzMacOS.user_desktop_dir~sw!!+...rcf|tjdS)zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsr rs ruser_runtime_dirzMacOS.user_runtime_dirs)001C1CDe1f1fgggrc|jS)zF:return: runtime directory shared by users, same as `user_runtime_dir`)rGrs rsite_runtime_dirzMacOS.site_runtime_dirs $$rN)r r )r r)__name__ __module__ __qualname____doc__propertyrr$r'r*r-r/r1r3r5r7r:r=r?rArCrErGrIrrr r sv  fffXfX IIIXI"""X""""X"YYYXYX JJJXJ"""X"WWWXW111X1111X1000X0...X.---X-///X/hhhXh%%%X%%%rr )rM __future__ros.pathrrtypingrapirpathlibrr __all__rOrrrVs """""" |%|%|%|%|%O|%|%|%@  r