Function ashpd::is_sandboxed

source ·
pub async fn is_sandboxed() -> bool
Expand description

Check whether the application is running inside a sandbox.

The function checks whether the file /.flatpak-info exists, or if the app is running as a snap, or if the environment variable GTK_USE_PORTAL is set to 1. As the return value of this function will not change during the runtime of a program; it is cached for future calls.