Module env

Module env 

Source
Expand description

Environment detection utilities

This module provides utilities for detecting the current runtime environment and platform-specific features.

Structs§

EnvironmentInfo
Environment information structure

Functions§

get_all_env_vars
Get all environment variables
get_cache_dir
Get cache directory path
get_config_dir
Get config directory path
get_cpu_count
Get the number of CPU cores
get_current_dir
Get current working directory
get_data_dir
Get data directory path
get_env_var
Get environment variable
get_env_var_or_default
Get environment variable with default value
get_environment_info
Get comprehensive environment information
get_home_dir
Get home directory path
get_physical_cpu_count
Get the number of physical CPU cores
get_temp_dir
Get temporary directory path
has_env_var
Check if environment variable exists
is_32bit
Check if running on 32-bit architecture
is_64bit
Check if running on 64-bit architecture
is_ci
Check if running in CI environment
is_debug
Check if running in debug mode
is_linux
Check if running on Linux
is_macos
Check if running on macOS
is_release
Check if running in release mode
is_unix
Check if running on Unix-like system
is_windows
Check if running on Windows
run_on_os
Execute code only on specific operating system
run_on_unix
Execute code only on Unix-like systems
run_on_windows
Execute code only on Windows