K ihdZddlmZddlZddlZddlmZddlm Z erddl m Z Gdd e Z d gZ y) zmacOS.) annotationsN) TYPE_CHECKING)PlatformDirsABC)PathcTeZdZdZeddZeddZeddZeddZeddZ eddZ eddZ edd Z edd Z edd Zedd Zedd ZeddZeddZeddZeddZeddZeddZy)MacOSa Platform directories for the macOS operating system. Follows the guidance from `Apple documentation `_. Makes use of the `appname `, `version `, `ensure_exists `. c^|jtjjdS)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 X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/platformdirs/macos.py user_data_dirzMacOS.user_data_dirs%001C1CDc1deecDdtjv}|r"tjjddnd}|r|j|dgng}|j |jd|j rt jj|S|dS)aH :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. ``$homebrew_prefix/share/$appname/$version``. If `multipath ` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/share/$appname/$version:/Library/Application Support/$appname/$version`` /opt/pythonrz/sharez/Library/Application Support sysprefixsplitr append multipathr pathsepjoinr is_homebrewhomebrew_prefix path_lists r site_data_dirzMacOS.site_data_dir s$szz1 @K#****=9!>::??9- -|rc8|j|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_path2s44T5G5GHHrc|jS)zC:return: config directory tied to the user, same as `user_data_dir`rrs ruser_config_dirzMacOS.user_config_dir7!!!rc|jS)zF:return: config directory shared by the users, same as `site_data_dir`)r$rs rsite_config_dirzMacOS.site_config_dir<r+rc^|jtjjdS)zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesr rs ruser_cache_dirzMacOS.user_cache_dirAs%001C1CDV1WXXrcDdtjv}|r"tjjddnd}|r|j|dgng}|j |jd|j rt jj|S|dS)a7 :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. ``$homebrew_prefix/var/cache/$appname/$version``. If `multipath ` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version`` rrrz /var/cachez/Library/Cachesrr s rsite_cache_dirzMacOS.site_cache_dirFs$szz1 @K#****=9!>::??9- -|rc8|j|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_pathXs44T5H5HIIrc|jS)zB:return: state directory tied to the user, same as `user_data_dir`r)rs ruser_state_dirzMacOS.user_state_dir]r+rc^|jtjjdS)zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsr rs r user_log_dirzMacOS.user_log_dirbs%001C1CDT1UVVrc@tjjdS)zC:return: documents directory tied to the user, e.g. ``~/Documents``z ~/Documentsr rrrs ruser_documents_dirzMacOS.user_documents_dirgww!!-00rc@tjjdS)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z ~/Downloadsr9rs ruser_downloads_dirzMacOS.user_downloads_dirlr;rc@tjjdS)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z ~/Picturesr9rs ruser_pictures_dirzMacOS.user_pictures_dirqsww!!,//rc@tjjdS)z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr9rs ruser_videos_dirzMacOS.user_videos_dirvsww!!*--rc@tjjdS)z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr9rs ruser_music_dirzMacOS.user_music_dir{sww!!),,rc@tjjdS)z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z ~/Desktopr9rs ruser_desktop_dirzMacOS.user_desktop_dirsww!!+..rc^|jtjjdS)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%001C1CDe1fggrc|jS)zF:return: runtime directory shared by users, same as `user_runtime_dir`)rGrs rsite_runtime_dirzMacOS.site_runtime_dirs$$$rN)returnstr)rJr)__name__ __module__ __qualname____doc__propertyrr$r'r*r-r/r1r3r5r7r:r=r?rArCrErGrIrrr r s{ ff"II""""YY"JJ""WW111100..--//hh%%rr )rO __future__ros.pathr rtypingrapirpathlibrr __all__rQrrrXs8 " ~%O~%D  r