U ò üeÄã@sFdZddlmZddlZddlZddlmZGdd„deƒZdgZ dS)zmacOS.é)Ú annotationsNé)ÚPlatformDirsABCc@s0eZdZdZeddœdd„ƒZeddœdd„ƒZeddœdd „ƒZeddœd d „ƒZeddœd d „ƒZ eddœdd„ƒZ eddœdd„ƒZ eddœdd„ƒZ eddœdd„ƒZ eddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœdd„ƒZeddœd d!„ƒZeddœd"d#„ƒZd$S)%ÚMacOSaÙ Platform directories for the macOS operating system. Follows the guidance from `Apple documentation `_. Makes use of the `appname `, `version `, `ensure_exists `. Ústr)ÚreturncCs| tj d¡¡S)zb:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``z~/Library/Application Support©Ú_append_app_name_and_versionÚosÚpathÚ expanduser©Úself©rú@/opt/hc_python/lib/python3.8/site-packages/platformdirs/macos.pyÚ user_data_dirszMacOS.user_data_dircCsJtj d¡}|r| d¡gng}| | d¡¡|jrBtj |¡S|dS)aA :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© ÚsysÚprefixÚ startswithr ÚappendÚ multipathr ÚpathsepÚjoin©rZ is_homebrewÚ path_listrrrÚ site_data_dirs  zMacOS.site_data_dircCs|jS)zC:return: config directory tied to the user, same as `user_data_dir`©rr rrrÚuser_config_dir*szMacOS.user_config_dircCs|jS)zF:return: config directory shared by the users, same as `site_data_dir`)rr rrrÚsite_config_dir/szMacOS.site_config_dircCs| tj d¡¡S)zV:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``z~/Library/Cachesrr rrrÚuser_cache_dir4szMacOS.user_cache_dircCsJtj d¡}|r| d¡gng}| | d¡¡|jrBtj |¡S|dS)a0 :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/CachesrrrrrrÚsite_cache_dir9s  zMacOS.site_cache_dircCs|jS)zB:return: state directory tied to the user, same as `user_data_dir`rr rrrÚuser_state_dirJszMacOS.user_state_dircCs| tj d¡¡S)zR:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``z~/Library/Logsrr rrrÚ user_log_dirOszMacOS.user_log_dircCs tj d¡S)zC:return: documents directory tied to the user, e.g. ``~/Documents``z ~/Documents©r r r r rrrÚuser_documents_dirTszMacOS.user_documents_dircCs tj d¡S)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``z ~/Downloadsr%r rrrÚuser_downloads_dirYszMacOS.user_downloads_dircCs tj d¡S)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``z ~/Picturesr%r rrrÚuser_pictures_dir^szMacOS.user_pictures_dircCs tj d¡S)z=:return: videos directory tied to the user, e.g. ``~/Movies``z~/Moviesr%r rrrÚuser_videos_dircszMacOS.user_videos_dircCs tj d¡S)z;:return: music directory tied to the user, e.g. ``~/Music``z~/Musicr%r rrrÚuser_music_dirhszMacOS.user_music_dircCs tj d¡S)z?:return: desktop directory tied to the user, e.g. ``~/Desktop``z ~/Desktopr%r rrrÚuser_desktop_dirmszMacOS.user_desktop_dircCs| tj d¡¡S)zg:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``z~/Library/Caches/TemporaryItemsrr rrrÚuser_runtime_dirrszMacOS.user_runtime_dircCs|jS)zF:return: runtime directory shared by users, same as `user_runtime_dir`)r,r rrrÚsite_runtime_dirwszMacOS.site_runtime_dirN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Úpropertyrrrr r!r"r#r$r&r'r(r)r*r+r,r-rrrrr sBr) r1Ú __future__rÚos.pathr rÚapirrÚ__all__rrrrÚs  sÿ