zut.context.is_user_scoped

zut.context.is_user_scoped() bool

Indicate whether the application is running in user-scoped context (typically: interactive, human user) or in system-scoped context (typically: daemon, service, non-interactive): - When in user-scoped context, the application should read and store data in user directories by default (XDG/APPDATA/home-based defaults). - When in system-scoped context, the application should read and store data in system directories (FHS/PROGRAMDATA).

The context is considered user-scoped context if the current user’s home directory: - Is an existing absolute directory - And is located under the hierarchy of standard users’ homes (Linux/BSD: /home, macOS: /Users, Windows: %SystemDrive%User).

See also: - get_app_config_dir, get_app_data_dir, get_app_cache_dir functions - XDG reference (X Desktop Group): https://specifications.freedesktop.org/basedir/latest/ - FHS reference (Filesystem Hierarchy Standard): https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html