g hdZddlmZddlZddlZddlmZddlm 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 A/opt/hc_python/lib/python3.12/site-packages/platformdirs/macos.py user_data_dirzMacOS.user_data_dirs%001C1CDc1deec tjjd}|r|jdgng}|j |jd|j rt jj|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 startswithr append multipathr pathsepjoinr is_homebrew path_lists r site_data_dirzMacOS.site_data_dir sojj++O< R]T667LMNce ::;YZ[ >>::??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_path1s44T5G5GHHrc|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)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_dir@s%001C1CDV1WXXrc tjjd}|r|jdgng}|j |jd|j rt jj|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/Cachesrrrs rsite_cache_dirzMacOS.site_cache_dirEsojj++O< VaT667PQRgi ::;LMN >>::??9- -|rc8|j|jS)zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)r$r/rs rsite_cache_pathzMacOS.site_cache_pathVs44T5H5HIIrc|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_dir`s%001C1CDT1UVVrc@tjjdS)zC:return: documents directory tied to the user, e.g. ``~/Documents``z ~/Documentsr rrrs ruser_documents_dirzMacOS.user_documents_direww!!-00rc@tjjdS)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z ~/Downloadsr7rs ruser_downloads_dirzMacOS.user_downloads_dirjr9rc@tjjdS)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z ~/Picturesr7rs ruser_pictures_dirzMacOS.user_pictures_dirosww!!,//rc@tjjdS)z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr7rs ruser_videos_dirzMacOS.user_videos_dirtsww!!*--rc@tjjdS)z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr7rs ruser_music_dirzMacOS.user_music_dirysww!!),,rc@tjjdS)z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z ~/Desktopr7rs ruser_desktop_dirzMacOS.user_desktop_dir~sww!!+..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`)rErs rsite_runtime_dirzMacOS.site_runtime_dirs$$$rN)returnstr)rHr)__name__ __module__ __qualname____doc__propertyrr"r%r(r+r-r/r1r3r5r8r;r=r?rArCrErGrrr r s{ ff II""""YY JJ""WW111100..--//hh%%rr )rM __future__ros.pathr rtypingrapirpathlibrr __all__rOrrrVs8 " |%O|%@  r